com.google.javascript.jscomp.ReplaceCssNames.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
,com/google/javascript/jscomp/ReplaceCssNames compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
-com/google/javascript/jscomp/AbstractCompiler createAstFactory +()Lcom/google/javascript/jscomp/AstFactory;
astFactory )Lcom/google/javascript/jscomp/AstFactory; symbolMap -Lcom/google/javascript/jscomp/CssRenamingMap; cssNameCollector ?Lcom/google/javascript/jscomp/ReplaceCssNames$CssNameCollector; ! " skiplist Ljava/util/Set; $ java/util/LinkedHashMap
# ' ( ) cssNamesBySymbol Ljava/util/Map; + java/util/LinkedHashSet
* . / " classesObjectsQualifiedNames 1 Dcom/google/javascript/jscomp/ReplaceCssNames$FindSetCssNameTraversal
0 3 4 1(Lcom/google/javascript/jscomp/ReplaceCssNames;)V
6 7 8 9 : *com/google/javascript/jscomp/NodeTraversal traverse ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal$Callback;)V
< = > gatherGetCssNameInstances 4(Lcom/google/javascript/rhino/Node;)Ljava/util/List; @ A B C D java/util/List iterator ()Ljava/util/Iterator; F G H I J java/util/Iterator hasNext ()Z F L M N next ()Ljava/lang/Object; P ?com/google/javascript/jscomp/ReplaceCssNames$GetCssNameInstance
O R S T getCssClassName ()Ljava/lang/String;
O V W J isCssClosureFileClassesMember
O Y Z T getCssClosureClassesMemberName \ ] ^ _ `
java/util/Map put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
O b c T !getCssClosureClassesQualifiedName e f g h i
java/util/Set add (Ljava/lang/Object;)Z k l m h n =com/google/javascript/jscomp/ReplaceCssNames$CssNameCollector (Ljava/lang/String;)V
O p q replaceWithExpression s Bcom/google/javascript/jscomp/ReplaceCssNames$CountCssNamesBySymbol
r 3 v Dcom/google/javascript/jscomp/ReplaceCssNames$GatherCssNamesTraversal
u 3 u y z { listOfCssNameInstances Ljava/util/List;
} ~ ? T com/google/javascript/rhino/Node getSourceFileName ? .css.closure.js
? ? ? ? ? java/lang/String endsWith (Ljava/lang/String;)Z
} ? ? J isCall
} ? ? ?
getFirstChild $()Lcom/google/javascript/rhino/Node; ? ? ? GET_CSS_NAME_FUNCTION "Lcom/google/javascript/rhino/Node;
} ? ? ? matchesQualifiedName %(Lcom/google/javascript/rhino/Node;)Z
? ? ? validateGetCssNameCall J(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/JSError;
O ? ? ?(Lcom/google/javascript/jscomp/ReplaceCssNames;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/JSError;Ljava/lang/String;)V
} ? ? ?
getChildCount ()I
? ? ? validateSingleArgGetCssNameCall
? ? ? validateTwoArgGetCssNameCall ? ? ? INVALID_NUM_ARGUMENTS_ERROR -Lcom/google/javascript/jscomp/DiagnosticType;
? ? ? ? valueOf (I)Ljava/lang/String;
? ? ? ? ? $com/google/javascript/jscomp/JSError make ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)Lcom/google/javascript/jscomp/JSError;
} ? ? ? getLastChild
? ? ? ? ? $com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object;
} ? ? J isStringLit ? ? ? STRING_LITERAL_EXPECTED_ERROR
} ? ? ? getToken %()Lcom/google/javascript/rhino/Token;
? ? ? ? T !com/google/javascript/rhino/Token toString
} ? ? ? getSecondChild
} ? ? ? getNext ? ? ? UNEXPECTED_STRING_LITERAL_ERROR
} ? ? T getString
? ? ? isGetCssNameCall ? ? ? NESTED_CALL_ERROR e ? ? i contains ? -
? ? ? ? split '(Ljava/lang/String;)[Ljava/lang/String; ? ? ? ? ? .com/google/javascript/jscomp/ReplaceCssNames$1 <$SwitchMap$com$google$javascript$jscomp$CssRenamingMap$Style [I ? ? ? ? ? +com/google/javascript/jscomp/CssRenamingMap getStyle 5()Lcom/google/javascript/jscomp/CssRenamingMap$Style;
? ? ? ? ? 1com/google/javascript/jscomp/CssRenamingMap$Style ordinal ? ? ? ? get &(Ljava/lang/String;)Ljava/lang/String; ? UNKNOWN_SYMBOL_WARNING
report )(Lcom/google/javascript/jscomp/JSError;)V
com/google/common/base/Joiner on 3(Ljava/lang/String;)Lcom/google/common/base/Joiner;
join '([Ljava/lang/Object;)Ljava/lang/String;
} n setString goog
com/google/javascript/rhino/IR name 6(Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
getCssName
getprop X(Lcom/google/javascript/rhino/Node;Ljava/lang/String;)Lcom/google/javascript/rhino/Node;" JSC_GETCSSNAME_NUM_ARGS$ =goog.getCssName called with "{0}" arguments, expected 1 or 2.
&'()* +com/google/javascript/jscomp/DiagnosticType error S(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType;, &JSC_GETCSSNAME_STRING_LITERAL_EXPECTED. Rgoog.getCssName called with invalid argument, string literal expected. Was "{0}".0 (JSC_GETCSSNAME_UNEXPECTED_STRING_LITERAL2 ?goog.getCssName called with invalid arguments, string literal passed as first of two arguments. Did you mean goog.getCssName("{0}-{1}")?4 JSC_GETCSSNAME_NESTED_CALL6 ,goog.getCssName: nested call is not allowed.8 !JSC_GETCSSNAME_UNKNOWN_CSS_SYMBOL: Egoog.getCssName called with unrecognized symbol "{0}" in class "{1}".
&<=* warning? $JSC_UNEXPECTED_SASS_GENERATED_CSS_TSA Q@sass_generated_css_ts JSDoc annotation is only allowed on .css.closure.js files. CD ? &UNEXPECTED_SASS_GENERATED_CSS_TS_ERRORF (JSC_UNKNOWN_CSS_SYMBOL_IN_CLASSES_OBJECTH /Symbol was not defined "{0}" in classes object. JK ? UNKNOWN_SYMBOL_ERRORM !JSC_INVALID_USE_OF_CLASSES_OBJECTO Oinvalid use of generated classes object. Only accessing its members is allowed. QR ? #INVALID_USE_OF_CLASSES_OBJECT_ERRORT setCssNameMapping VW ? GOOG_SET_CSS_NAME_MAPPINGY )com/google/javascript/jscomp/CompilerPass Signature 5Ljava/util/Map; #Ljava/util/Set; RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable; ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/CssRenamingMap;Lcom/google/javascript/jscomp/ReplaceCssNames$CssNameCollector;Ljava/util/Set;)V Code LineNumberTable LocalVariableTable this .Lcom/google/javascript/jscomp/ReplaceCssNames; LocalVariableTypeTable MethodParameters ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/CssRenamingMap;Lcom/google/javascript/jscomp/ReplaceCssNames$CssNameCollector;Ljava/util/Set;)V process G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V cssClassName Ljava/lang/String; getCssNameInstance ALcom/google/javascript/jscomp/ReplaceCssNames$GetCssNameInstance; externs root getCssNameInstances SLjava/util/List;
StackMapTable gatherCssNamesTraversal FLcom/google/javascript/jscomp/ReplaceCssNames$GatherCssNamesTraversal; w(Lcom/google/javascript/rhino/Node;)Ljava/util/List; isNotInCssClosureFile node sourceFileName createGetCssNameInstance w(Lcom/google/javascript/rhino/Node;Ljava/lang/String;)Lcom/google/javascript/jscomp/ReplaceCssNames$GetCssNameInstance; n cssClosureClassesQualifiedName validationError &Lcom/google/javascript/jscomp/JSError; callNode
childCount I stringLiteralArg firstArg secondArg processStringNode %(Lcom/google/javascript/rhino/Node;)V part i replaced [Ljava/lang/String; replacement parts?
SourceFile ReplaceCssNames.java NestMembers? Scom/google/javascript/jscomp/ReplaceCssNames$GatherCssNamesTraversal$TraversalState? ]com/google/javascript/jscomp/ReplaceCssNames$GatherCssNamesTraversal$SassGeneratedCssTsExpert InnerClasses CssNameCollector FindSetCssNameTraversal? 3com/google/javascript/jscomp/NodeTraversal$Callback Callback GetCssNameInstance CountCssNamesBySymbol GatherCssNamesTraversal Style TraversalState SassGeneratedCssTsExpert X ? ? ? ? ? ? ? ? ? ? ? D ? K ? R ? ( ) Z [ / " Z \ ] ^ ! " Z \ W ? _ ` ? 8*? *+? *+?
? *,? *-? *? *? #Y? %? &*? *Y? ,? -? a &