com.google.javascript.jscomp.lint.CheckPrimitiveAsObject.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 ?
Dcom/google/javascript/jscomp/NodeTraversal$AbstractPostOrderCallback ()V
8com/google/javascript/jscomp/lint/CheckPrimitiveAsObject compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
*com/google/javascript/jscomp/NodeTraversal traverse ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal$Callback;)V
"checkForPrimitiveObjectConstructor Q(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;)V
"checkForPrimitiveObjectDeclaration
com/google/javascript/rhino/Node getJSDocInfo )()Lcom/google/javascript/rhino/JSDocInfo;
! " # $ % %com/google/javascript/rhino/JSDocInfo getTypeNodes ()Ljava/util/Collection; ' ( ) * + java/util/Collection iterator ()Ljava/util/Iterator; - . / 0 1 java/util/Iterator hasNext ()Z - 3 4 5 next ()Ljava/lang/Object;
7 8 *checkTypeNodeForPrimitiveObjectDeclaration : ; < visit ](Lcom/google/javascript/jscomp/NodeTraversal;)Lcom/google/javascript/jscomp/NodeUtil$Visitor;
> ? @ A B %com/google/javascript/jscomp/NodeUtil
visitPreOrder T(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeUtil$Visitor;)V
D E 1 isNew
G H I
getFirstChild $()Lcom/google/javascript/rhino/Node;
K L 1 isName
N O P getString ()Ljava/lang/String; R S T PRIMITIVE_OBJECT_CONSTRUCTORS (Lcom/google/common/collect/ImmutableSet;
V W X Y Z &com/google/common/collect/ImmutableSet contains (Ljava/lang/Object;)Z \ ] ^ NEW_PRIMITIVE_OBJECT -Lcom/google/javascript/jscomp/DiagnosticType; ` java/lang/String
b c d report e(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)V
f g 1 isStringLit i j ^ PRIMITIVE_OBJECT_DECLARATION l JSC_PRIMITIVE_OBJECT n "Explicit creation of a {0} object.
p q r s t +com/google/javascript/jscomp/DiagnosticType warning S(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType; v JSC_PRIMITIVE_OBJECT_DECLARATION x 4Declaration of {0} object instead of primitive type. z Boolean | Number ~ String
V ? ? ? of `(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet; ? )com/google/javascript/jscomp/CompilerPass Signature ; 2(Lcom/google/javascript/jscomp/AbstractCompiler;)V Code LineNumberTable LocalVariableTable this :Lcom/google/javascript/jscomp/lint/CheckPrimitiveAsObject; MethodParameters process G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V externs "Lcom/google/javascript/rhino/Node; root s(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V t ,Lcom/google/javascript/jscomp/NodeTraversal; n parent typeRoot jsDocInfo 'Lcom/google/javascript/rhino/JSDocInfo;
StackMapTable constructorName Ljava/lang/String; constructorFunction 3lambda$checkTypeNodeForPrimitiveObjectDeclaration$0 typeName node
SourceFile CheckPrimitiveAsObject.java BootstrapMethods ?
? ? ? ? ? "java/lang/invoke/LambdaMetafactory metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ? %(Lcom/google/javascript/rhino/Node;)V ?
? ? InnerClasses AbstractPostOrderCallback ? 3com/google/javascript/jscomp/NodeTraversal$Callback Callback ? -com/google/javascript/jscomp/NodeUtil$Visitor Visitor ? %java/lang/invoke/MethodHandles$Lookup ? java/lang/invoke/MethodHandles Lookup 1 ? ] ^ j ^ S T ? ? ? ? F
*? *+? ? ? 3 4 5 ?
? ?
? ? ? ? L
*? ,*?
? ?
9 : ?
? ?
? ?
? ? ? ? ? ; ? ? ]
*+,? *+,? ? ? > ? @ ? *
? ?
? ?
? ?
? ? ?
? ? ? ? ? 5,? N-? .-? ? & :? , ? ? 2 ? :*+? 6??? ? C E F * G 1 H 4 J ? 4 * ? ? 5 ? ? 5 ? ? 5 ? ? 0 ? ? ? ? ! -? ? ? ? 8 ? M ,+? 9 ? =? ?
M
W ? ? ? ? ? ? ? ? ? ? ? ? 6,? C? 1,? FN-? J? %-? M:? Q? U? +,? [? _YS? a? ? Z [ \ ] ^ $ _ 5 c ? 4 ? ? ) ? ? 6 ? ? 6 ? ? 6 ? ? ? 5 ? ? ?
? ? ~ '+? e? "+? MM? Q,? U? *+? h? _Y,S? a? ? P Q R S &