com.google.javascript.refactoring.ErrorToFixMapper.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler-unshaded Show documentation
Show all versions of closure-compiler-unshaded Show documentation
Closure Compiler is a JavaScript optimizing compiler. It parses your
JavaScript, analyzes it, removes dead code and rewrites and minimizes
what's left. It also checks syntax, variable references, and types, and
warns about common JavaScript pitfalls. It is used in many of Google's
JavaScript apps, including Gmail, Google Web Search, Google Maps, and
Google Docs.
The newest version!
???? 7?
java/lang/Object ()V java/util/LinkedHashMap
2com/google/javascript/refactoring/ErrorToFixMapper metadataForEachScript Ljava/util/LinkedHashMap; compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
getFixForJsError X(Lcom/google/javascript/jscomp/JSError;)Lcom/google/javascript/refactoring/SuggestedFix;
'com/google/common/collect/ImmutableList of =(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;
! " # $com/google/javascript/jscomp/JSError getType /()Lcom/google/javascript/jscomp/DiagnosticType; % & ' ( ) +com/google/javascript/jscomp/DiagnosticType key Ljava/lang/String;
+ , - . / java/lang/String hashCode ()I 1 JSC_IMPLICITLY_NONNULL_JSDOC
+ 3 4 5 equals (Ljava/lang/Object;)Z 7 JSC_IMPLICITLY_NULLABLE_JSDOC 9 &JSC_MISSING_NULLABILITY_MODIFIER_JSDOC ; +JSC_NULL_MISSING_NULLABILITY_MODIFIER_JSDOC
= > ? $getFixesForImplicitNullabilityErrors Q(Lcom/google/javascript/jscomp/JSError;)Lcom/google/common/collect/ImmutableList;
A B +()Lcom/google/common/collect/ImmutableList; D JSC_REDECLARED_VARIABLE F JSC_REFERENCE_BEFORE_DECLARE H JSC_MISSING_SEMICOLON J JSC_REQUIRES_NOT_SORTED L JSC_PROVIDES_NOT_SORTED N JSC_DEBUGGER_STATEMENT_PRESENT P JSC_USELESS_EMPTY_STATEMENT R 'JSC_INEXISTENT_PROPERTY_WITH_SUGGESTION T .JSC_STRICT_INEXISTENT_PROPERTY_WITH_SUGGESTION V JSC_MISSING_CALL_TO_SUPER X &JSC_INVALID_SUPER_CALL_WITH_SUGGESTION Z JSC_MISSING_REQUIRE \ $JSC_MISSING_REQUIRE_IN_PROVIDES_FILE ^ JSC_MISSING_REQUIRE_TYPE ` )JSC_MISSING_REQUIRE_TYPE_IN_PROVIDES_FILE b JSC_EXTRA_REQUIRE_WARNING d ?JSC_REFERENCE_TO_SHORT_IMPORT_BY_LONG_NAME_INCLUDING_SHORT_NAME f ,JSC_REFERENCE_TO_FULLY_QUALIFIED_IMPORT_NAME h (JSC_REDUNDANT_NULLABILITY_MODIFIER_JSDOC j "JSC_MISSING_CONST_ON_CONSTANT_CASE
l m getFixForRedeclaration
o p getFixForEarlyReference
r s getFixForMissingSemicolon
u v getFixForUnsortedRequires
x y getFixForUnsortedProvides { 6com/google/javascript/refactoring/SuggestedFix$Builder
z
~ ? getNode $()Lcom/google/javascript/rhino/Node;
z ? ? ? attachMatchedNodeInfo ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/AbstractCompiler;)Lcom/google/javascript/refactoring/SuggestedFix$Builder; ? Remove debugger statement
z ? ? ? setDescription L(Ljava/lang/String;)Lcom/google/javascript/refactoring/SuggestedFix$Builder;
z ? ? ? delete \(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/refactoring/SuggestedFix$Builder;
z ? ? ? build 2()Lcom/google/javascript/refactoring/SuggestedFix;
? ? removeEmptyStatement
? ? getFixForInexistentProperty
? ? getFixForMissingSuper
? ? getFixForInvalidSuper ? ? ? ? ? 9com/google/javascript/refactoring/SuggestedFix$ImportType REQUIRE ;Lcom/google/javascript/refactoring/SuggestedFix$ImportType;
? ? ? getFixForMissingRequire ?(Lcom/google/javascript/jscomp/JSError;Lcom/google/javascript/refactoring/SuggestedFix$ImportType;)Lcom/google/javascript/refactoring/SuggestedFix; ? ? ? ? REQUIRE_TYPE
? ? getFixForExtraRequire
? ? )getFixForReferenceToShortImportByLongName
? ? *getFixForRedundantNullabilityModifierJsDoc
? ? getFixForConstantCaseErrors
? ? ? ? ? com/google/javascript/rhino/Node isName ()Z
? ? ? ? ? $com/google/common/base/Preconditions
checkState (ZLjava/lang/Object;)V
? ? ? ? getParent
? ? ? ? ? %com/google/javascript/jscomp/NodeUtil isNameDeclaration %(Lcom/google/javascript/rhino/Node;)Z
? ? ? ? hasChildren
? ? ? ? hasOneChild ? Remove redundant declaration ? +Convert redundant declaration to assignment
? ? ? ? cloneNode
? ? ? ?
getFirstChild
? ? ? ? cloneTree
? ? ? ? ? com/google/javascript/rhino/IR assign h(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
? ? ? ?
exprResult F(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
z ? ? ? replace ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/AbstractCompiler;)Lcom/google/javascript/refactoring/SuggestedFix$Builder; ? java/util/ArrayList
? ? ? ? ? 5 java/util/List add
? ? ? ? getNext ? ? ? ? isEmpty
? ? ? ? getToken %()Lcom/google/javascript/rhino/Token;
? &(Lcom/google/javascript/rhino/Token;)V ? iterator ()Ljava/util/Iterator;
? java/util/Iterator hasNext
next ()Ljava/lang/Object;
? addChildToBack %(Lcom/google/javascript/rhino/Node;)V 1
z insertBefore ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/AbstractCompiler;Ljava/lang/String;)Lcom/google/javascript/refactoring/SuggestedFix$Builder; 2 EARLY_REF Ljava/util/regex/Pattern;
!"# getDescription ()Ljava/lang/String;
%&'() java/util/regex/Pattern matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
+,-. ? java/util/regex/Matcher matches
+012 group (I)Ljava/lang/String;
?45 ? getEnclosingStatement7 Insert var declaration statement 9:; makeConcatWithConstants &(Ljava/lang/String;)Ljava/lang/String;
z=> n(Lcom/google/javascript/rhino/Node;Ljava/lang/String;)Lcom/google/javascript/refactoring/SuggestedFix$Builder;@ .com/google/javascript/refactoring/NodeMetadata
?B C 2(Lcom/google/javascript/jscomp/AbstractCompiler;)VE 'com/google/javascript/refactoring/Match
DG H U(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/refactoring/NodeMetadata;)V
JK#
getSourceName
MNOPQ -com/google/javascript/jscomp/AbstractCompiler
getScriptNode 6(Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
STU getMetadataForScript V(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/refactoring/ScriptMetadata; WX FULLY_QUALIFIED_NAME Z[ USE_SHORT_NAME
z]^_ addGoogRequire ?(Lcom/google/javascript/refactoring/Match;Ljava/lang/String;Lcom/google/javascript/refactoring/ScriptMetadata;)Lcom/google/javascript/refactoring/SuggestedFix$Builder;
abcd; 0com/google/javascript/refactoring/ScriptMetadata getAlias
?fg ? isQualifiedName
?ij# getQualifiedName
?lm# getString
+o ?p D(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
?rst newQName e(Lcom/google/javascript/jscomp/AbstractCompiler;Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
?vw# getSourceFileNamey ?{ Make nullability explicit} ! Make type non-nullable
? ? O(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;? "java/lang/IllegalArgumentException 9
?? ? (Ljava/lang/String;)V? Remove empty statement
z?? ? deleteWithoutRemovingWhitespace? ;
z??> insertAfter
??? ? getFunctionBody? super();
z??> addChildToFront ?? DID_YOU_MEAN
???? checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; 9 9
z??> rename ?? MISSING_REQUIRE? Unexpected error description: %s
?? ?? ((ZLjava/lang/String;Ljava/lang/Object;)V
+???
startsWith (Ljava/lang/String;)Z? 7Expected error location %s to start with namespace <%s>
?? ?? :(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
z??? addImport ?(Lcom/google/javascript/refactoring/Match;Ljava/lang/String;Lcom/google/javascript/refactoring/SuggestedFix$ImportType;Lcom/google/javascript/refactoring/ScriptMetadata;)Lcom/google/javascript/refactoring/SuggestedFix$Builder; ????? !com/google/javascript/rhino/Token OBJECT_PATTERN #Lcom/google/javascript/rhino/Token;
???? getEnclosingType i(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Token;)Lcom/google/javascript/rhino/Node;? Delete unused symbol
??? ? isStringKey? Delete extra require
z?? ? %deleteWithoutRemovingWhitespaceBefore
??? ? getEnclosingScript? 5com/google/javascript/jscomp/lint/CheckRequiresSorted ????? :com/google/javascript/jscomp/lint/CheckRequiresSorted$Mode COLLECT_ONLY