com.google.javascript.jscomp.CheckClosureImports$Checker.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? 8com/google/javascript/jscomp/CheckClosureImports$Checker this$0 2Lcom/google/javascript/jscomp/CheckClosureImports;
Acom/google/javascript/jscomp/NodeTraversal$AbstractModuleCallback j(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/modules/ModuleMetadataMap;)V moduleMetadataMap 8Lcom/google/javascript/jscomp/modules/ModuleMetadataMap; 0com/google/javascript/jscomp/CheckClosureImports namespacesSeen Ljava/util/Set;
Ecom/google/javascript/jscomp/modules/ModuleMetadataMap$ModuleMetadata googNamespaces /()Lcom/google/common/collect/ImmutableMultiset;
! " +com/google/common/collect/ImmutableMultiset
elementSet *()Lcom/google/common/collect/ImmutableSet; $ % & ' (
java/util/Set addAll (Ljava/util/Collection;)Z
* + , - . com/google/javascript/rhino/Node getParent $()Lcom/google/javascript/rhino/Node;
* 0 1 2 isCall ()Z
4 5 6
kindOfCall d(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/CheckClosureImports$ClosureImport;
8 9 : checkImport ?(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/modules/ModuleMetadataMap$ModuleMetadata;Lcom/google/javascript/jscomp/CheckClosureImports$ClosureImport;)V
* < = .
getFirstChild ? @ A GOOG_MODULE_GET "Lcom/google/javascript/rhino/Node;
* C D E matchesQualifiedName %(Lcom/google/javascript/rhino/Node;)Z
G H I checkGoogModuleGet ?(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/modules/ModuleMetadataMap$ModuleMetadata;)V
* K L 2 isName
N O P checkValidImportCodeReference Q(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;)V
R S T U V $com/google/common/base/Preconditions
checkState (Z)V X Y A GOOG_REQUIRE [ \ ] ^ _ >com/google/javascript/jscomp/CheckClosureImports$ClosureImport REQUIRE @Lcom/google/javascript/jscomp/CheckClosureImports$ClosureImport; a b A GOOG_FORWARD_DECLARE [ d e _ FORWARD_DECLARE g h A GOOG_REQUIRE_TYPE [ j k _ REQUIRE_TYPE m n A GOOG_REQUIRE_DYNAMIC [ p q _ REQUIRE_DYNAMIC
s t u v w *com/google/javascript/jscomp/NodeTraversal getScope &()Lcom/google/javascript/jscomp/Scope;
* y z { getString ()Ljava/lang/String;
} ~ ? ? "com/google/javascript/jscomp/Scope getVar >(Ljava/lang/String;)Lcom/google/javascript/jscomp/AbstractVar; ? com/google/javascript/jscomp/Var
? ? ? . getNameNode
? ? ? ? E %com/google/javascript/jscomp/NodeUtil isDeclarationLValue
* ? ? 2 isStringKey
* ? ? . getGrandparent
? ? ? E isNameDeclaration
* ? ? 2 hasOneChild
* ? ? 2 hasChildren
* ? ? . getLastChild
s ? ? 2 inModuleHoistScope ? ? ? ? ? 3com/google/javascript/jscomp/ClosurePrimitiveErrors MODULE_USES_GOOG_MODULE_GET -Lcom/google/javascript/jscomp/DiagnosticType; ? java/lang/String
s ? ? ? report e(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)V
? ? 2 isEs6Module
? ? 2 isGoogModule ? ? ? compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
? ? ? ? ? -com/google/javascript/jscomp/AbstractCompiler
getOptions 0()Lcom/google/javascript/jscomp/CompilerOptions; ? ? ? ? ? ,com/google/javascript/jscomp/CompilerOptions moduleResolutionMode ?Lcom/google/javascript/jscomp/deps/ModuleLoader$ResolutionMode; ? ? ? ? ? =com/google/javascript/jscomp/deps/ModuleLoader$ResolutionMode WEBPACK
s ? ? 2
inGlobalScope
? ? ? E isNormalOrOptChainGetProp
* ? ? 2 isDestructuringLhs
* ? ? 2 isAssign
* ? ? 2 isObjectPattern ? ? ? ? INVALID_GET_CALL_SCOPE
* ? ? 2 hasTwoChildren
* ? ? . getSecondChild
* ? ? 2 isStringLit ? ? ? INVALID_CLOSURE_IMPORT_CALL ? goog.module.get
? ? ? ? ? 6com/google/javascript/jscomp/modules/ModuleMetadataMap getModulesByGoogNamespace *()Lcom/google/common/collect/ImmutableMap;
? ? ? ? ? &com/google/common/collect/ImmutableMap get &(Ljava/lang/Object;)Ljava/lang/Object; ? ? ? ? MISSING_MODULE_OR_PROVIDE ? ? ? ? ? 1com/google/javascript/jscomp/ClosureRewriteModule INVALID_GET_ALIAS
? ? ? . getNode
? getRValueOfLValue F(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
? isCallTo G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Z
?
equals (Ljava/lang/Object;)Z
R
V
checkArgument
* . getNext
? lastIndexOf (I)I
? substring (I)Ljava/lang/String;
? 2 isEmpty
? charAt (I)C
!"#$% com/google/common/base/Ascii isUpperCase (C)Z
!'() toLowerCase (C)C
!+,) toUpperCase ./0 makeConcatWithConstants '(CLjava/lang/String;)Ljava/lang/String; 2345 ? /com/google/javascript/jscomp/ClosureCheckModule "INCORRECT_SHORTNAME_CAPITALIZATION
s78 2 inGlobalHoistScope
s:; 2
inModuleScope
=> 2 isModule
*@A 2 isExprResult ?CD ? INVALID_CLOSURE_CALL_SCOPE_ERROR
[FG { callName IJ ? "ONE_CLOSURE_IMPORT_PER_DECLARATION
[LM 2 aliasMustBeConstant
*OP 2 isLet RS ? LET_CLOSURE_IMPORT
*UV 2 isConst XY ? 0LHS_OF_CLOSURE_IMPORT_MUST_BE_CONST_IN_ES_MODULE
[[\ 2 allowDestructuring
^_ E isValidDestructuringImport ab ? $INVALID_CLOSURE_IMPORT_DESTRUCTURING de ? NO_CLOSURE_IMPORT_DESTRUCTURING
ghi checkShortName c(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Ljava/lang/String;)V ?kl ? -MISSING_MODULE_OR_PROVIDE_FOR_FORWARD_DECLARE
[no 2
mustBeOrdered
qrs verifyRequireOrder ?(Ljava/lang/String;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/jscomp/modules/ModuleMetadataMap$ModuleMetadata;)V uvwx ? .com/google/javascript/jscomp/Es6RewriteModules SHOULD_IMPORT_ES6_MODULE ?(Lcom/google/javascript/jscomp/CheckClosureImports;Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/modules/ModuleMetadataMap;)V Code LineNumberTable LocalVariableTable this :Lcom/google/javascript/jscomp/CheckClosureImports$Checker; MethodParameters enterModule l(Lcom/google/javascript/jscomp/modules/ModuleMetadataMap$ModuleMetadata;Lcom/google/javascript/rhino/Node;)V
currentModule GLcom/google/javascript/jscomp/modules/ModuleMetadataMap$ModuleMetadata; moduleScopeRoot visit ?(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/modules/ModuleMetadataMap$ModuleMetadata;Lcom/google/javascript/rhino/Node;)V t ,Lcom/google/javascript/jscomp/NodeTraversal; n parent
StackMapTable RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable; callNode nameNode var "Lcom/google/javascript/jscomp/Var; declarationNameNode decl target getSubExprRoot invalid Z aliasName Ljava/lang/String; aliasVar aliasVarNodeRhs call namespace requiredModule maybeAssign isFillingAnAlias stringKey destructuringLhs
objectPattern newStartChar C
correctedName
shortNameNode shortName lastSegment declaration lhs
importType atTopLevelScope validAssignment isAliased
SourceFile CheckClosureImports.java NestHost BootstrapMethods?
???/? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;? InnerClasses Checker AbstractModuleCallback ModuleMetadata
ClosureImport? .com/google/javascript/jscomp/deps/ModuleLoader ResolutionMode? %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup y z [ *+? *,-? *-?
? { ? ? ? ?| }~ ? ?
? ?? z W *? ? +? ? ? # W? {
? ?| }~ ?? ? A ? ? ?? z ? Q-? ?,? ):,? /? 4*,? 3:? *+,-? 7? ,? ;? >? B?
*+,-? F? ,? J? *+,? M? { 2 ? ? , 9 @
J P
| H ' 5 _ Q}~ Q?? Q? A Q?? Q? A F? A ? ? & * [? ? ? ? ? ? ? ? 5 6 z ? M+? /? Q+? ;? W? B? ? Z?+? ;? `? B? ? c?+? ;? f? B? ? i?+? ;? l? B? ? o?? { *
% ) 6 : G K| M}~ M? A ? ? ? ? O P z ^ ?+? r,? x? |? ?N-? -? ?,? ?-? ?:? ? ?? ?? )? ?? ? ?? ?? ? ):? ?? $? ?? ? ;? ?? ? ;? ?? /? ?*? ;? ?? 3:? ?? { J " $ % ( ") /* 0. ;/ F0 M1 W2 _3 j4 v5 w8 ?: ?; ?=| H ?}~ ??? ?? A }?? " j? A M ?? A ? 5 _ ? " ? ? ? * D *? * * ? [ ? ? H I z j ?+? ?? +,? ?? ?? ??-? ?? ?-? ?? ?*? ?? ?? ?? å u+? ș n,:? )? ˙
? ):???6? ):? J? ? Ι 6? %? љ ? ;:? J? ? ԙ 6? +,? ?? ?? ?,? ڙ
,? ݶ ?? +,? ?? ?Y?S? ??,? ݶ x:*?
? ?? ?? :? +,? ?? ?YS? ??,? ):? љ ? ;? J? ? 6-? ??
-? ?? ? 6? x? s,? )? ;? x: +? r ? |? ?:
? +,? ?? ?? ??
? ?? ?:? ? `?? +,? ?? ?? ??? ?? x?? +,? ?? ?? ??? { ? - @ A B E F &G 2O 9Q <R GS QV TW [X kY qZ y[ ?\ ?] ?a ?b ?g ?h ?i ?l ?m ?o ?p ?q ?t ?uv-w7xC{Q|V}b~c?m?}???????????| ? ? ? A <