com.google.javascript.jscomp.ExternExportsPass$Export.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? 5com/google/javascript/jscomp/ExternExportsPass$Export this$0 0Lcom/google/javascript/jscomp/ExternExportsPass;
java/lang/Object ()V
$com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; java/lang/String
symbolName Ljava/lang/String; com/google/javascript/rhino/Node value "Lcom/google/javascript/rhino/Node;
! " getExportedPath ()Ljava/lang/String;
$ % & getValue $()Lcom/google/javascript/rhino/Node;
( ) * appendExtern 7(Ljava/lang/String;Lcom/google/javascript/rhino/Node;)V
, - . / 0 .com/google/javascript/jscomp/ExternExportsPass computePathPrefixes =(Ljava/lang/String;)Lcom/google/common/collect/ImmutableList;
2 3 4 5 6 'com/google/common/collect/ImmutableList size ()I
2 8 9 : get (I)Ljava/lang/Object; <
.prototype
> ? @ endsWith (Ljava/lang/String;)Z , B C D alreadyExportedPaths Ljava/util/Set; F G H I J
java/util/Set contains (Ljava/lang/Object;)Z
L M N O P %com/google/javascript/jscomp/NodeUtil getBestJSDocInfo K(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/JSDocInfo;
R S T isClass ()Z
V W X Y T %com/google/javascript/rhino/JSDocInfo containsTypeDefinition
[ \ T
isFunction
^ _ ` createExternFunction F(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
b c ` createExternFunctionForEs6Class
e f T isObjectLit
h i j
checkState (Z)V
l m ` createExternObjectLit
o p q buildNamespaceJSDoc )()Lcom/google/javascript/rhino/JSDocInfo;
s t u v w com/google/javascript/rhino/IR objectlit G([Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
y z { setJSDocInfo K(Lcom/google/javascript/rhino/JSDocInfo;)Lcom/google/javascript/rhino/Node;
s } ~ & empty
? ? ? appendPathDefinition ^(Ljava/lang/String;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/JSDocInfo;)V ? .
? I ? (Ljava/lang/CharSequence;)Z , ? ? ? compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
L ? ? ? newQName e(Lcom/google/javascript/jscomp/AbstractCompiler;Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
? ? T isEmpty
L ? ? ` newExpr
s ? ? ? assign h(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
s ? ? ? name 6(Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
s ? ? ` var
L ? ? ?
newVarNode X(Ljava/lang/String;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
? ? T isExprResult
? ? &
getFirstChild
? ? T isVar , ? ? externsRoot
? ? ? addChildToBack %(Lcom/google/javascript/rhino/Node;)V F ? ? J add
? ? ` *createExternsParamListFromOriginalFunction ?
s ? ? & block
s ? ? ? function ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
? ? ? getJSType -()Lcom/google/javascript/rhino/jstype/JSType;
? ? ? setJSType O(Lcom/google/javascript/rhino/jstype/JSType;)Lcom/google/javascript/rhino/Node;
L ? ? ` getFunctionParameters ? java/util/ArrayList
?
? ? ? getOriginalNameForParam 6(Lcom/google/javascript/rhino/Node;)Ljava/lang/String; ? ? ? java/util/List
? ? & getNext
? ? ? +createExternsParamListFromOriginalParamList 4(Ljava/util/List;)Lcom/google/javascript/rhino/Node;
? ? ? ? ? )com/google/javascript/rhino/jstype/JSType assertFunctionType 3()Lcom/google/javascript/rhino/jstype/FunctionType;
? ? ? ? ? /com/google/javascript/rhino/jstype/FunctionType
getParameters +()Lcom/google/common/collect/ImmutableList;
? ? ? ? ? java/util/Collections nCopies %(ILjava/lang/Object;)Ljava/util/List;
s ? ? w paramList ? 1com/google/javascript/jscomp/DefaultNameGenerator
? ? ? ? ? &com/google/common/collect/ImmutableSet copyOf @(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
? ? ? &(Ljava/util/Set;Ljava/lang/String;[C)V ? iterator ()Ljava/util/Iterator; T java/util/Iterator hasNext
next ()Ljava/lang/Object;
? " *com/google/javascript/jscomp/NameGenerator generateNextName
T isRest
& getOnlyChild
T isDefaultValue
T isName
! " getOriginalName
#$ " getString
&' T isDestructuringPattern
) i* (ZLjava/lang/Object;)V
L,- ` 'getEs6ClassConstructorMemberFunctionDef
/0 ? &createExternsParamListFromFunctionType
V234 builder 1()Lcom/google/javascript/rhino/JSDocInfo$Builder;
6789: -com/google/javascript/rhino/JSDocInfo$Builder build *(Z)Lcom/google/javascript/rhino/JSDocInfo;
6<= T recordConstancy? constA duplicate
?CDE of N(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
6GHI recordSuppressions (Ljava/util/Set;)V
6K9 q
MN q buildEmptyJSDoc
PQ T isStringKey
sST ? stringKey
sVWX number %(D)Lcom/google/javascript/rhino/Node;
sZ[ ? propdef
]^ " getQualifiedName ,`ab
definitionMap Ljava/util/Map;def 9
java/util/Map g(Lcom/google/javascript/jscomp/ExternExportsPass;Ljava/lang/String;Lcom/google/javascript/rhino/Node;)V Code LineNumberTable LocalVariableTable this 7Lcom/google/javascript/jscomp/ExternExportsPass$Export; MethodParameters generateExterns jsdoc 'Lcom/google/javascript/rhino/JSDocInfo; initializer
pathPrefix isCompletePathPrefix Z skipPathPrefix exportedValueDefinesNewType i I path
valueToExport pathPrefixes )Lcom/google/common/collect/ImmutableList; LocalVariableTypeTable =Lcom/google/common/collect/ImmutableList;
StackMapTable pathDefinition
qualifiedPath exportedFunction externFunction
originalParam originalParamList originalParamNames Ljava/util/List; $Ljava/util/List; functionType +Lcom/google/javascript/rhino/jstype/JSType; emptyParamNames externParamName originalParamName
nameGenerator ,Lcom/google/javascript/jscomp/NameGenerator; Signature H(Ljava/util/List;)Lcom/google/javascript/rhino/Node; nameOrPatternNode originalName paramNode classJSType
exportedClass constructorMethodDefinition /Lcom/google/javascript/rhino/JSDocInfo$Builder; child exportedObjectLit lit index
qualifiedName
definition RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable;
SourceFile ExternExportsPass.java NestHost InnerClasses Export Builder g h j *+? *? *,?
? ? *-?
? ? ? i P Q R Sj kl m
n h ;
**? *? #? '? i
Z [j
kl ! " ) * h ? ?+? +N6-? 1? ?-? 7? :-? 1d? ? 6;? =? *? ? A? E ? ? ? 6? ? ?6,? ,? K: ,? Q? ? ? U? 6:
? :,? 6,? Z?
*,? ]: ? Q,? Q?
*,? a: ? @,? d? g*,? k: ? /? %? *? n:
*? ? r? k: ? xW? ? |: *
? ???? i z n p q u . w 2 x A y U z Z { ] ~ ` ? d ? j ? ~ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? p ? ?j ? j op ? q ? q ? q ?
q ?r . ?st U ?ut ` ?vt ?
q ? rop
?wx ?kl ?y ?z ?{| } ?{~ g ? 2? " @? !@? ? V? ? V&? 2 V ? 2 ? m y z ? ? h } ?+?? ?? /*? ? ?+? ?:,? ??
? ?:? ,? ?? ?:? ,? ?? +? ?? ?:?
+,? ?:-? '? ?? ? ?-? xW? ? ?? g-? xW*? ? ?? ?*? ? A+? ? W? i F ? ? ? ? ' ? 2 ? 5 ? <