Uses of Class
com.google.javascript.rhino.Node
-
-
Uses of Node in com.google.javascript.jscomp
Methods in com.google.javascript.jscomp that return Node Modifier and Type Method Description static NodeNodeUtil. emptyFunction()protected NodeCompiler. ensureLibraryInjected(java.lang.String resourceName, boolean force)static NodeNodeUtil. findPreorder(Node node, com.google.common.base.Predicate<Node> pred, com.google.common.base.Predicate<Node> traverseChildrenPred)Returns the first Node matching the given pred via a pre-order traversal.static NodeAstManipulations. fuseExpressions(Node exp1, Node exp2)Returns a single node equivalent to executing<expr1, expr2>.static NodeNodeUtil. getAssignedValue(Node n)For an assignment or variable declaration get the assigned value.NodeCompilerInput. getAstRoot(AbstractCompiler compiler)NodeJsAst. getAstRoot(AbstractCompiler compiler)NodeRecoverableJsAst. getAstRoot(AbstractCompiler compiler)NodeSourceAst. getAstRoot(AbstractCompiler compiler)Gets the root node of the AST for the source file this represents.NodeSyntheticAst. getAstRoot(AbstractCompiler compiler)static NodeNodeUtil. getBestJSDocInfoNode(Node n)static NodeNodeUtil. getBestLValue(Node n)Find the l-value that the given r-value is being assigned to.static NodeNodeUtil. getClassMembers(Node n)NodeNodeTraversal. getClosestHoistScopeRoot()NodeDestructuredTarget. getComputedProperty()Returns a COMPUTED_PROP node or nullNodeNodeTraversal. getCurrentNode()Returns the node currently being traversed.NodeSymbolTable.Symbol. getDeclarationNode()static NodeNodeUtil. getDeclaringParent(Node targetNode)Returns the node that is effectively declaring the given target.NodeDestructuredTarget. getDefaultValue()static NodeNodeUtil. getEnclosingBlock(Node n)Finds the block containing the given node.static NodeNodeUtil. getEnclosingBlockScopeRoot(Node n)static NodeNodeUtil. getEnclosingClass(Node n)Finds the class containing the given node.NodeNodeTraversal. getEnclosingFunction()Examines the functions stack for the last instance of a function node.static NodeNodeUtil. getEnclosingFunction(Node n)Finds the function containing the given node.static NodeNodeUtil. getEnclosingModuleIfPresent(Node n)static NodeNodeUtil. getEnclosingNode(Node n, com.google.common.base.Predicate<Node> pred)static NodeNodeUtil. getEnclosingScopeRoot(Node n)static NodeNodeUtil. getEnclosingScript(Node n)Finds the script containing the given node.static NodeNodeUtil. getEnclosingStatement(Node n)static NodeNodeUtil. getEnclosingType(Node n, Token type)Gets the closest ancestor to the given node of the provided type.static NodeNodeUtil. getEs6ClassConstructorMemberFunctionDef(Node classNode)protected NodeCompiler. getExternsRoot()static NodeNodeUtil. getFunctionBody(Node fn)Return a BLOCK node for the given FUNCTION node.static NodeNodeUtil. getFunctionParameters(Node fnNode)NodeAbstractVar. getInitialValue()protected NodeCompiler. getJsRoot()static NodeNodeUtil. getLoopCodeBlock(Node n)NodeJsMessageDefinition. getMessageNode()NodeAbstractVar. getNameNode()static NodeNodeUtil. getNameNode(Node n)Gets the node of a function or class's name.NodeAbstractVar. getNode()NodeDestructuredTarget. getNode()NodeImplicitNullabilityCheck.Result. getNode()abstract NodeJSError. getNode()Node where the warning occurred.NodeReference. getNode()protected NodeCompiler. getNodeForCodeInsertion(JSModule module)NodeAbstractVar. getParentNode()abstract NodeAbstractCompiler. getRoot()Returns the root node of the AST, which includes both externs and source.NodeCompiler. getRoot()NodeAbstractScope. getRootNode()Gets the container node of the scope.static NodeNodeUtil. getRootOfQualifiedName(Node qName)Gets the root node of a qualified name.static NodeNodeUtil. getRootTarget(Node targetNode)Returns the outermost target enclosing the given assignment target.static NodeNodeUtil. getRValueOfLValue(Node n)Gets the r-value (or initializer) of a node returned by getBestLValue.NodeAbstractVar. getScopeRoot()NodeNodeTraversal. getScopeRoot()Returns the current scope's root.abstract NodeAbstractCompiler. getScriptNode(java.lang.String filename)NodeCompiler. getScriptNode(java.lang.String filename)protected NodeFileAwareWarningsGuard. getScriptNodeForError(JSError error)NodeDestructuredTarget. getStringKey()Returns a STRING_KEY node or nullstatic NodeNodeUtil. newDeclaration(Node lhs, Node rhs, Token declarationType)static NodeNodeUtil. newPropertyAccess(AbstractCompiler compiler, Node context, java.lang.String name)Creates a property access on thecontexttree.static NodeNodeUtil. newQName(AbstractCompiler compiler, java.lang.String name)Creates a node representing a qualified name.static NodeNodeUtil. newQNameDeclaration(AbstractCompiler compiler, java.lang.String name, Node value, JSDocInfo info)Creates a node representing a qualified name.static NodeNodeUtil. newQNameDeclaration(AbstractCompiler compiler, java.lang.String name, Node value, JSDocInfo info, Token type)Creates a node representing a qualified name.static NodeNodeUtil. newUndefinedNode(Node srcReferenceNode)Create a node for an empty result expression: "void 0"NodeCompiler. parse(SourceFile file)abstract NodeAbstractCompiler. parseSyntheticCode(java.lang.String code)Parses code for injecting.NodeCompiler. parseSyntheticCode(java.lang.String js)Methods in com.google.javascript.jscomp that return types with arguments of type Node Modifier and Type Method Description static java.util.List<Node>NodeUtil. findLhsNodesInNode(Node assigningParent)Retrieves lhs nodes declared or assigned in a given assigning parent node.java.util.Collection<Node>SymbolTable. getAllJSDocInfoNodes()static ControlFlowGraph<Node>ControlFlowAnalysis. getCfg(AbstractCompiler compiler, Node cfgRoot)ControlFlowGraph<Node>NodeTraversal. getControlFlowGraph()Gets the control flow graph for the current JS scope.java.util.Map<java.lang.String,Node>CompilerOptions. getDefineReplacements()Returns the map of define replacements.static java.util.List<Node>NodeUtil. getParentChangeScopeNodes(java.util.List<Node> scopeNodes)Returns the list of scope nodes which are parents of the provided list of scope nodes.java.util.Map<java.lang.String,Node>TemplateAstMatcher. getTemplateNodeToMatchMap()Returns a map from named template Nodes (such as parameters or local variables) to Nodes that were matches from the last matched template.java.util.Map<java.lang.String,Node>CompilerOptions. getTweakReplacements()Returns the map of tweak replacements.static com.google.common.collect.ImmutableSet<Node>ConformanceAllowlister. getViolatingNodes(Compiler compiler, Node externs, Node ast, com.google.javascript.jscomp.Requirement requirement)static java.lang.Iterable<Node>NodeUtil. preOrderIterable(Node root)Same asNodeUtil.preOrderIterable(Node, Predicate)but iterates over all nodes in the tree without exception.static java.lang.Iterable<Node>NodeUtil. preOrderIterable(Node root, com.google.common.base.Predicate<Node> travserseNodePredicate)Create anIterableover the given node and all descendents.static java.util.List<Node>NodeUtil. removeNestedChangeScopeNodes(java.util.List<Node> scopeNodes)Removes any scope nodes from the provided list that are nested within some other scope node also in the list.Methods in com.google.javascript.jscomp with parameters of type Node Modifier and Type Method Description protected voidCodeGenerator. add(Node n)protected voidCodeGenerator. add(Node node, CodeGenerator.Context context)voidSourceMap. addMapping(Node node, FilePosition outputStartPosition, FilePosition outputEndPosition)static booleanNodeUtil. canMergeBlock(Node block)A check inside a block to see if there are const, let, class, or function declarations to be safe and not hoist them into the upper block.voidCheckConformance.Rule. check(NodeTraversal t, Node n)Perform conformance checkvoidConformanceRules.AbstractRule. check(NodeTraversal t, Node n)protected abstract ConformanceRules.ConformanceResultConformanceRules.AbstractRule. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanCreateDom. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanCreateElement. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanExpose. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanForOf. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanGlobalVars. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanNullDeref. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanThrowOfNonErrorTypes. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanUnknownDirectThisPropsReferences. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanUnknownThis. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanUnknownTypedClassPropsReferences. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.BanUnresolvedType. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.RequireFileoverviewVisibility. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.RequireUseStrict. checkConformance(NodeTraversal t, Node n)protected ConformanceRules.ConformanceResultConformanceRules.StrictBanUnresolvedType. checkConformance(NodeTraversal t, Node n)voidCodingConvention. checkForCallingConventionDefinitions(Node getPropNode, java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions)Checks for getprops that set the calling conventions on delegate methods.voidCodingConventions.Proxy. checkForCallingConventionDefinitions(Node n, java.util.Map<java.lang.String,java.lang.String> delegateCallingConventions)protected voidJsMessageVisitor. checkNode(Node node, Token type)Checks a node's type.static com.google.common.collect.ImmutableSet<java.lang.String>NodeUtil. collectExternVariableNames(AbstractCompiler compiler, Node externs)ScopeSyntacticScopeCreator.ScopeFactory. create(Scope parent, Node n)static com.google.common.collect.ImmutableList<DestructuredTarget>DestructuredTarget. createAllNonEmptyTargetsInPattern(JSTypeRegistry registry, com.google.common.base.Supplier<JSType> patternType, Node pattern)Returns all the targets directly in the given pattern, except for EMPTY nodesstatic com.google.common.collect.ImmutableList<DestructuredTarget>DestructuredTarget. createAllNonEmptyTargetsInPattern(JSTypeRegistry registry, JSType patternType, Node pattern)Returns all the targets directly in the given pattern, except for EMPTY nodesScopeSyntacticScopeCreator. createScope(Node n, AbstractScope<?,?> parent)static booleanCodingConventions. defaultIsFunctionCallThatAlwaysThrows(Node n, java.lang.String alwaysThrowsFunctionName)SymbolTable.ReferenceSymbolTable.Symbol. defineReferenceAt(Node n)static voidNodeUtil. deleteChildren(Node n, AbstractCompiler compiler)Permanently delete all the children of the given node, including reporting changes.static voidNodeUtil. deleteFunctionCall(Node n, AbstractCompiler compiler)Permanently delete the given call from the AST while maintaining a valid node structure, as well as report the related AST changes to the given compiler.static voidNodeUtil. deleteNode(Node n, AbstractCompiler compiler)Permanently delete the given node from the AST, as well as report the related AST changes/deletions to the given compiler.CodingConvention.CacheClosureCodingConvention. describeCachingCall(Node node)CodingConvention.CacheCodingConvention. describeCachingCall(Node node)Builds aCodingConvention.Cacheinstance from the given call node and returns that instance, or null if theNodedoes not resemble a cache utility call.CodingConvention.CacheCodingConventions.Proxy. describeCachingCall(Node node)CodingConvention.BindClosureCodingConvention. describeFunctionBind(Node n, boolean callerChecksTypes, boolean iCheckTypes)CodingConvention.BindCodingConvention. describeFunctionBind(Node n)A Bind instance or null.CodingConvention.BindCodingConvention. describeFunctionBind(Node n, boolean callerChecksTypes, boolean iCheckTypes)A Bind instance or null.CodingConvention.BindCodingConventions.Proxy. describeFunctionBind(Node n)CodingConvention.BindCodingConventions.Proxy. describeFunctionBind(Node n, boolean callerChecksTypes, boolean iCheckTypes)voidNodeTraversal.ChangeScopeRootCallback. enterChangeScopeRoot(AbstractCompiler compiler, Node root)voidClosureCheckModule. enterModule(ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)protected voidNodeTraversal.AbstractModuleCallback. enterModule(ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)Called when the traversal enters a global file or module.voidClosureCheckModule. exitModule(ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)protected voidNodeTraversal.AbstractModuleCallback. exitModule(ModuleMetadataMap.ModuleMetadata oldModule, Node moduleScopeRoot)Called when the traversal exits a global file or module.java.lang.StringClosureCodingConvention. extractClassNameIfProvide(Node node, Node parent)Extracts X from goog.provide('X'), if the applied Node is goog.java.lang.StringCodingConvention. extractClassNameIfProvide(Node node, Node parent)Convenience method for determining provided dependencies amongst different JS scripts.java.lang.StringCodingConventions.Proxy. extractClassNameIfProvide(Node node, Node parent)java.lang.StringClosureCodingConvention. extractClassNameIfRequire(Node node, Node parent)Extracts X from goog.require('X'), if the applied Node is goog.java.lang.StringCodingConvention. extractClassNameIfRequire(Node node, Node parent)Convenience method for determining required dependencies amongst different JS scripts.java.lang.StringCodingConventions.Proxy. extractClassNameIfRequire(Node node, Node parent)booleanClosureCodingConvention. extractIsModuleFile(Node node, Node parent)booleanCodingConvention. extractIsModuleFile(Node node, Node parent)Convenience method for determining if the node indicates the file is a "module" file (a file whose top level symbols are not in global scope).booleanCodingConventions.Proxy. extractIsModuleFile(Node node, Node parent)static java.util.List<Node>NodeUtil. findLhsNodesInNode(Node assigningParent)Retrieves lhs nodes declared or assigned in a given assigning parent node.static NodeNodeUtil. findPreorder(Node node, com.google.common.base.Predicate<Node> pred, com.google.common.base.Predicate<Node> traverseChildrenPred)Returns the first Node matching the given pred via a pre-order traversal.static NodeAstManipulations. fuseExpressions(Node exp1, Node exp2)Returns a single node equivalent to executing<expr1, expr2>.static NodeNodeUtil. getAssignedValue(Node n)For an assignment or variable declaration get the assigned value.static JSDocInfoNodeUtil. getBestJSDocInfo(Node n)Find the best JSDoc for the given node.static NodeNodeUtil. getBestJSDocInfoNode(Node n)static NodeNodeUtil. getBestLValue(Node n)Find the l-value that the given r-value is being assigned to.static java.lang.StringNodeUtil. getBestLValueName(Node lValue)Get the name of the given l-value node.static ControlFlowGraph<Node>ControlFlowAnalysis. getCfg(AbstractCompiler compiler, Node cfgRoot)CodingConvention.SubclassRelationshipClosureCodingConvention. getClassesDefinedByCall(Node callNode)Checks if the given method defines a subclass relationship, and if it does, returns information on that relationship.CodingConvention.SubclassRelationshipCodingConvention. getClassesDefinedByCall(Node callNode)Checks if the given method defines a subclass relationship, and if it does, returns information on that relationship.CodingConvention.SubclassRelationshipCodingConventions.Proxy. getClassesDefinedByCall(Node callNode)static NodeNodeUtil. getClassMembers(Node n)java.lang.StringProcessCommonJSModules. getCommonJsImportPath(Node requireCall)static java.lang.StringProcessCommonJSModules. getCommonJsImportPath(Node requireCall, ModuleLoader.ResolutionMode resolutionMode)static com.google.common.collect.ImmutableList<JSError>ConformanceAllowlister. getConformanceErrors(Compiler compiler, Node externs, Node ast, com.google.javascript.jscomp.Requirement requirement)static intNodeUtil. getCount(Node n, com.google.common.base.Predicate<Node> pred, com.google.common.base.Predicate<Node> traverseChildrenPred)static JSTypeExpressionNodeUtil. getDeclaredTypeExpression(Node declaration)Return declared JSDoc type for the given name declaration, or null if none present.static NodeNodeUtil. getDeclaringParent(Node targetNode)Returns the node that is effectively declaring the given target.CodingConvention.DelegateRelationshipCodingConvention. getDelegateRelationship(Node callNode)CodingConvention.DelegateRelationshipCodingConventions.Proxy. getDelegateRelationship(Node callNode)static NodeNodeUtil. getEnclosingBlock(Node n)Finds the block containing the given node.static NodeNodeUtil. getEnclosingBlockScopeRoot(Node n)static NodeNodeUtil. getEnclosingClass(Node n)Finds the class containing the given node.static NodeNodeUtil. getEnclosingFunction(Node n)Finds the function containing the given node.SymbolTable.SymbolScopeSymbolTable. getEnclosingFunctionScope(Node n)Gets the scope that contains the given node.static NodeNodeUtil. getEnclosingModuleIfPresent(Node n)static NodeNodeUtil. getEnclosingNode(Node n, com.google.common.base.Predicate<Node> pred)SymbolTable.SymbolScopeSymbolTable. getEnclosingScope(Node n)Gets the scope that contains the given node.static NodeNodeUtil. getEnclosingScopeRoot(Node n)static NodeNodeUtil. getEnclosingScript(Node n)Finds the script containing the given node.static NodeNodeUtil. getEnclosingStatement(Node n)static NodeNodeUtil. getEnclosingType(Node n, Token type)Gets the closest ancestor to the given node of the provided type.static NodeNodeUtil. getEs6ClassConstructorMemberFunctionDef(Node classNode)static NodeNodeUtil. getFunctionBody(Node fn)Return a BLOCK node for the given FUNCTION node.static NodeNodeUtil. getFunctionParameters(Node fnNode)static InputIdNodeUtil. getInputId(Node n)static NodeUtil.ValueTypeNodeUtil. getKnownValueType(Node n)Evaluate a node's token and attempt to determine which primitive value type it could resolve to Without proper type information some assumptions had to be made for operations that could result in a BigInt or a Number.static NodeNodeUtil. getLoopCodeBlock(Node n)static java.lang.StringNodeUtil. getName(Node n)static NodeNodeUtil. getNameNode(Node n)Gets the node of a function or class's name.static java.lang.StringNodeUtil. getNearestFunctionName(Node n)Gets the function's name.CodingConvention.ObjectLiteralCastClosureCodingConvention. getObjectLiteralCast(Node callNode)CodingConvention.ObjectLiteralCastCodingConvention. getObjectLiteralCast(Node callNode)Checks if the given method performs a object literal cast, and if it does, returns information on the cast.CodingConvention.ObjectLiteralCastCodingConventions.Proxy. getObjectLiteralCast(Node callNode)static voidNodeUtil. getParamOrPatternNames(Node n, java.util.function.Consumer<Node> cb)Callscbwith all NAMEs declared in a PARAM_LIST or destructuring pattern.static NodeNodeUtil. getRootOfQualifiedName(Node qName)Gets the root node of a qualified name.static NodeNodeUtil. getRootTarget(Node targetNode)Returns the outermost target enclosing the given assignment target.static NodeNodeUtil. getRValueOfLValue(Node n)Gets the r-value (or initializer) of a node returned by getBestLValue.java.lang.StringChromeCodingConvention. getSingletonGetterClassName(Node callNode)java.lang.StringClosureCodingConvention. getSingletonGetterClassName(Node callNode)java.lang.StringCodingConvention. getSingletonGetterClassName(Node callNode)Checks if the given method defines a singleton getter, and if it does, returns the name of the class with the singleton getter.java.lang.StringCodingConventions.Proxy. getSingletonGetterClassName(Node callNode)static StaticSourceFileNodeUtil. getSourceFile(Node n)static java.lang.StringNodeUtil. getSourceName(Node n)static java.lang.StringNodeUtil. getStringValue(Node n)Gets the value of a node as a String, or null if it cannot be converted.static com.google.common.collect.ImmutableSet<Node>ConformanceAllowlister. getViolatingNodes(Compiler compiler, Node externs, Node ast, com.google.javascript.jscomp.Requirement requirement)static com.google.common.collect.ImmutableSet<java.lang.String>ConformanceAllowlister. getViolatingPaths(Compiler compiler, Node externs, Node ast, com.google.javascript.jscomp.Requirement requirement)voidAstValidator.ViolationHandler. handleViolation(java.lang.String message, Node n)static booleanNodeUtil. has(Node node, com.google.common.base.Predicate<Node> pred, com.google.common.base.Predicate<Node> traverseChildrenPred)voidCheckMissingAndExtraRequires. hotSwapScript(Node scriptRoot, Node originalRoot)voidClosureCheckModule. hotSwapScript(Node scriptRoot, Node originalRoot)voidDartSuperAccessorsPass. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6CheckModule. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6ConvertSuper. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6ExtractClasses. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6ForOfConverter. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6NormalizeShorthandProperties. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RenameVariablesInParamLists. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteArrowFunction. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteBlockScopedDeclaration. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteBlockScopedFunctionDeclaration. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteClass. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteClassExtendsExpressions. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteDestructuring. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteModules. hotSwapScript(Node scriptNode, Node originalRoot)voidEs6RewriteRestAndSpread. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6RewriteScriptsToModules. hotSwapScript(Node scriptNode, Node originalRoot)voidEs6SplitVariableDeclarations. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs6ToEs3ClassSideInheritance. hotSwapScript(Node scriptRoot, Node originalRoot)voidEs7RewriteExponentialOperator. hotSwapScript(Node scriptRoot, Node originalRoot)voidFieldCleanupPass. hotSwapScript(Node scriptRoot, Node originalRoot)voidGatherModuleMetadata. hotSwapScript(Node scriptRoot, Node originalRoot)voidHotSwapCompilerPass. hotSwapScript(Node scriptRoot, Node originalRoot)Process the JS with root node root.voidInjectTranspilationRuntimeLibraries. hotSwapScript(Node scriptRoot, Node originalRoot)voidLateEs6ToEs3Converter. hotSwapScript(Node scriptRoot, Node originalRoot)voidMarkUntranspilableFeaturesAsRemoved. hotSwapScript(Node scriptRoot, Node originalRoot)voidReferenceCollectingCallback. hotSwapScript(Node scriptRoot, Node originalRoot)Same as process but only runs on a part of AST associated to one script.voidRewriteAsyncFunctions. hotSwapScript(Node scriptRoot, Node originalRoot)voidRewriteAsyncIteration. hotSwapScript(Node scriptRoot, Node originalRoot)voidRewriteGoogJsImports. hotSwapScript(Node scriptRoot, Node originalRoot)voidRewriteNullishCoalesceOperator. hotSwapScript(Node scriptRoot, Node originalRoot)voidRewriteObjectSpread. hotSwapScript(Node scriptRoot, Node originalRoot)voidRewritePolyfills. hotSwapScript(Node scriptRoot, Node originalRoot)voidWhitespaceWrapGoogModules. hotSwapScript(Node scriptRoot, Node originalRoot)java.util.List<java.lang.String>ClosureCodingConvention. identifyTypeDeclarationCall(Node n)java.util.List<java.lang.String>CodingConvention. identifyTypeDeclarationCall(Node n)Checks if the given CALL node is forward-declaring any types, and returns the name of the types if it is.java.util.List<java.lang.String>CodingConventions.Proxy. identifyTypeDeclarationCall(Node n)static booleanNodeUtil. isAnyFor(Node n)static booleanNodeUtil. isAssignmentOp(Node n)static booleanNodeUtil. isBigIntResult(Node n)Returns true if the result of node evaluation is always a bigintstatic booleanNodeUtil. isBlocklessArrowFunctionResult(Node n)static booleanNodeUtil. isBooleanResult(Node n)static booleanControlFlowAnalysis. isBreakTarget(Node target, java.lang.String label)Checks if target is actually the break target of labeled continue.static booleanNodeUtil. isCallOrNew(Node node)static booleanNodeUtil. isCallTo(Node n, Node targetMethod)A faster version ofNodeUtil.isCallTo(Node, String).static booleanNodeUtil. isCallTo(Node n, java.lang.String qualifiedName)static booleanNodeUtil. isClassDeclaration(Node n)booleanClosureCodingConvention. isClassFactoryCall(Node callNode)booleanCodingConvention. isClassFactoryCall(Node callNode)Checks if the given method is a call to a class factory, such a factory returns a unique class.booleanCodingConventions.Proxy. isClassFactoryCall(Node callNode)booleanGoogleCodingConvention. isClassFactoryCall(Node callNode)static booleanProcessCommonJSModules. isCommonJsDynamicImportCallback(Node n, ModuleLoader.ResolutionMode resolutionMode)Recognize if a node is a dynamic module import.static booleanProcessCommonJSModules. isCommonJsExport(NodeTraversal t, Node export, ModuleLoader.ResolutionMode resolutionMode)Recognize if a node is a module export.booleanProcessCommonJSModules. isCommonJsImport(Node requireCall)static booleanProcessCommonJSModules. isCommonJsImport(Node requireCall, ModuleLoader.ResolutionMode resolutionMode)Recognize if a node is a module import.static booleanNodeUtil. isCompoundAssignmentOp(Node n)static booleanNodeUtil. isControlStructure(Node n)Determines whether the given node is a FOR, DO, WHILE, WITH, or IF node.static booleanNodeUtil. isDeclarationLValue(Node n)Determines whether this node is used as an L-value that is a declaration.static booleanNodeUtil. isEmptyBlock(Node block)Returns whether this a BLOCK node with no children.static booleanNodeUtil. isEnhancedFor(Node n)static booleanControlFlowGraph. isEnteringNewCfgNode(Node n)static booleanNodeUtil. isEs6Constructor(Node fnNode)static booleanNodeUtil. isEs6ConstructorMemberFunctionDef(Node memberFunctionDef)static booleanEs6RewriteModules. isEs6ModuleRoot(Node scriptNode)Return whether or not the given script node represents an ES6 module file.static booleanNodeUtil. isExprCall(Node n)Is this node a call expression statement?static booleanNodeUtil. isFromTypeSummary(Node n)Determine if the given SCRIPT is a @typeSummary file, like an i.js filebooleanClosureCodingConvention. isFunctionCallThatAlwaysThrows(Node n)booleanCodingConvention. isFunctionCallThatAlwaysThrows(Node n)Used by CheckMissingReturn.booleanCodingConventions.Proxy. isFunctionCallThatAlwaysThrows(Node n)static booleanNodeUtil. isFunctionDeclaration(Node n)Is this node a function declaration? A function declaration is a function that has a name that is added to the current scope (i.e.static booleanNodeUtil. isHoistedFunctionDeclaration(Node n)Is this node a hoisted function declaration? A function declaration in the scope root is hoisted to the top of the scope.static booleanNodeUtil. isImportedName(Node n)static booleanNodeUtil. isInFunction(Node n)booleanCodingConvention. isInlinableFunction(Node n)booleanCodingConventions.Proxy. isInlinableFunction(Node n)static booleanNodeUtil. isLhsByDestructuring(Node n)Returns true if the node is a lhs value of a destructuring assignment.static booleanNodeUtil. isLhsOfAssign(Node n)static booleanNodeUtil. isLiteralValue(Node n, boolean includeFunctions)Returns true if this is a literal value.static booleanNodeUtil. isLoopStructure(Node n)Determines whether the given node is a FOR, DO, or WHILE node.static booleanNodeUtil. isLValue(Node n)Determines whether this node is used as an L-value.static booleanNodeUtil. isMethodDeclaration(Node n)Is this node a class or object literal member function?static booleanNodeUtil. isNameDeclaration(Node n)Is this node a name declaration?static booleanNodeUtil. isNameDeclOrSimpleAssignLhs(Node n, Node parent)Determines whether this node is strictly on the left hand side of an assign or var initialization.static booleanNodeUtil. isNamespaceDecl(Node n)Returns true iff this node defines a namespace, e.g., /** @const * / var goog = {}; /** @const * / var goog = goog || {}; /** @const * / goog.math = goog.math || {};static booleanNodeUtil. isNormalGet(Node n)Is this a GETPROP or GETELEM node?static booleanNodeUtil. isNormalOrOptChainCall(Node n)Is this a CALL or OPTCHAIN_CALL?static booleanNodeUtil. isNormalOrOptChainGet(Node n)Is this a GETPROP, OPTCHAIN_GETPROP, GETELEM, or OPTCHAIN_GETELEM?static booleanNodeUtil. isNormalOrOptChainGetProp(Node n)Is this a GETPROP or OPTCHAIN_GETPROP?static booleanNodeUtil. isNullOrUndefined(Node n)static booleanNodeUtil. isNumericResult(Node n)Returns true if the result of node evaluation is always a numberstatic booleanNodeUtil. isObjectDefinePropertiesDefinition(Node n)Returnstrueif the node is a definition with Object.definePropertiesstatic booleanNodeUtil. isObjectResult(Node n)static booleanNodeUtil. isObjLitProperty(Node node)Returns true if the node is a property of an object literal.static booleanNodeUtil. isOptChainGet(Node n)Is this an OPTCHAIN_GETPROP or OPTCHAIN_GETELEM node?static booleanNodeUtil. isOptChainNode(Node n)Is this a OPTCHAIN_GETPROP, OPTCHAIN_GETELEM, OPTCHAIN_CALL node?booleanCodingConvention. isOptionalParameter(Node parameter)This checks whether a given parameter name should be treated as an optional parameter as far as type checking or function call arg count checking is concerned.booleanCodingConventions.Proxy. isOptionalParameter(Node parameter)booleanGoogleCodingConvention. isOptionalParameter(Node parameter)This checks whether a given parameter name should be treated as an optional parameter as far as type checking or function call arg count checking is concerned.booleanClosureCodingConvention. isPropertyTestFunction(Node call)booleanCodingConvention. isPropertyTestFunction(Node call)Whether this CALL function is testing for the existence of a property.booleanCodingConventions.Proxy. isPropertyTestFunction(Node call)booleanCodingConvention. isPrototypeAlias(Node getProp)Whether this GETPROP node is an alias for an object prototype.booleanCodingConventions.Proxy. isPrototypeAlias(Node getProp)static booleanNodeUtil. isPrototypePropertyDeclaration(Node n)static booleanNodeUtil. isStatement(Node n)static booleanNodeUtil. isStatementBlock(Node n)static booleanNodeUtil. isStatementParent(Node parent)static booleanNodeUtil. isStringResult(Node n)static booleanNodeUtil. isTopLevel(Node n)static booleanNodeUtil. isUndefined(Node n)booleanCodingConvention. isVarArgsParameter(Node parameter)This checks whether a given parameter should be treated as a marker for a variable argument list function.booleanCodingConventions.Proxy. isVarArgsParameter(Node parameter)booleanGoogleCodingConvention. isVarArgsParameter(Node parameter)static JSErrorJSError. make(Node n, CheckLevel level, DiagnosticType type, java.lang.String... arguments)Creates a JSError from a file and Node position.static JSErrorJSError. make(Node n, DiagnosticType type, java.lang.String... arguments)Creates a JSError from a file and Node position.static voidNodeUtil. markFunctionsDeleted(Node node, AbstractCompiler compiler)Recurses through a tree, marking all function nodes deleted.booleanTemplateAstMatcher. matches(Node n)booleanAstAnalyzer. mayHaveSideEffects(Node n)Returns true if the node which may have side effects when executed.static booleanControlFlowAnalysis. mayThrowException(Node n)Determines if the subtree might throw an exception.static NodeNodeUtil. newDeclaration(Node lhs, Node rhs, Token declarationType)static NodeNodeUtil. newPropertyAccess(AbstractCompiler compiler, Node context, java.lang.String name)Creates a property access on thecontexttree.static NodeNodeUtil. newQNameDeclaration(AbstractCompiler compiler, java.lang.String name, Node value, JSDocInfo info)Creates a node representing a qualified name.static NodeNodeUtil. newQNameDeclaration(AbstractCompiler compiler, java.lang.String name, Node value, JSDocInfo info, Token type)Creates a node representing a qualified name.static NodeNodeUtil. newUndefinedNode(Node srcReferenceNode)Create a node for an empty result expression: "void 0"static java.lang.Iterable<Node>NodeUtil. preOrderIterable(Node root)Same asNodeUtil.preOrderIterable(Node, Predicate)but iterates over all nodes in the tree without exception.static java.lang.Iterable<Node>NodeUtil. preOrderIterable(Node root, com.google.common.base.Predicate<Node> travserseNodePredicate)Create anIterableover the given node and all descendents.voidAstValidator. process(Node externs, Node root)voidCheckConformance. process(Node externs, Node root)voidCheckMissingAndExtraRequires. process(Node externs, Node root)voidCheckMissingRequires. process(Node externs, Node root)voidCheckTypeImportCodeReferences. process(Node externs, Node root)voidChromePass. process(Node externs, Node root)voidClosureCheckModule. process(Node externs, Node root)voidCompilerPass. process(Node externs, Node root)Process the JS with root node root.voidControlFlowAnalysis. process(Node externs, Node root)voidCrossChunkMethodMotion. process(Node externRoot, Node root)voidCrossChunkReferenceCollector. process(Node root)voidCrossChunkReferenceCollector. process(Node externs, Node root)Convenience method for running this pass over a tree with this class as a callback.voidDartSuperAccessorsPass. process(Node externs, Node root)voidDeadPropertyAssignmentElimination. process(Node externs, Node root)voidEs6CheckModule. process(Node externs, Node root)voidEs6ConvertSuper. process(Node externs, Node root)voidEs6ExtractClasses. process(Node externs, Node root)voidEs6ForOfConverter. process(Node externs, Node root)voidEs6NormalizeShorthandProperties. process(Node externs, Node root)voidEs6RelativizeImportPaths. process(Node externs, Node root)voidEs6RenameVariablesInParamLists. process(Node externs, Node root)voidEs6RewriteArrowFunction. process(Node externs, Node root)voidEs6RewriteBlockScopedDeclaration. process(Node externs, Node root)voidEs6RewriteBlockScopedFunctionDeclaration. process(Node externs, Node root)voidEs6RewriteClass. process(Node externs, Node root)voidEs6RewriteClassExtendsExpressions. process(Node externs, Node root)voidEs6RewriteDestructuring. process(Node externs, Node root)voidEs6RewriteModules. process(Node externs, Node root)voidEs6RewriteModulesToCommonJsModules. process(Node externs, Node root)voidEs6RewriteRestAndSpread. process(Node externs, Node root)voidEs6RewriteScriptsToModules. process(Node externs, Node root)voidEs6SplitVariableDeclarations. process(Node externs, Node root)voidEs6ToEs3ClassSideInheritance. process(Node externs, Node root)voidEs7RewriteExponentialOperator. process(Node externs, Node root)voidExportTestFunctions. process(Node externs, Node root)voidFieldCleanupPass. process(Node externs, Node root)voidFindModuleDependencies. process(Node root)voidGatherGetterAndSetterProperties. process(Node externs, Node root)voidGatherModuleMetadata. process(Node externs, Node root)voidGenerateExports. process(Node externs, Node root)voidImplicitNullabilityCheck. process(Node externs, Node root)voidInjectTranspilationRuntimeLibraries. process(Node externs, Node root)voidJ2clAssertRemovalPass. process(Node externs, Node root)voidJ2clChecksPass. process(Node externs, Node root)voidJ2clClinitPrunerPass. process(Node externs, Node root)voidJ2clConstantHoisterPass. process(Node externs, Node root)voidJ2clPass. process(Node externs, Node root)voidJ2clPropertyInlinerPass. process(Node externs, Node root)voidJ2clUtilGetDefineRewriterPass. process(Node externs, Node root)voidJsMessageVisitor. process(Node externs, Node root)voidLateEs6ToEs3Converter. process(Node externs, Node root)voidMarkUntranspilableFeaturesAsRemoved. process(Node externs, Node root)voidProcessCommonJSModules. process(Node externs, Node root)voidReferenceCollectingCallback. process(Node root)voidReferenceCollectingCallback. process(Node externs, Node root)Convenience method for running this pass over a tree with this class as a callback.voidRewriteAsyncFunctions. process(Node externs, Node root)voidRewriteAsyncIteration. process(Node externs, Node root)voidRewriteGoogJsImports. process(Node externs, Node root)voidRewriteJsonToModule. process(Node externs, Node root)Module rewriting is done a on per-file basis prior to main compilation.voidRewriteNullishCoalesceOperator. process(Node externs, Node root)voidRewriteObjectSpread. process(Node externs, Node root)voidRewritePolyfills. process(Node externs, Node root)voidSyncCompilerFeatures. process(Node externs, Node root)voidTransformAMDToCJSModule. process(Node externs, Node root)voidTypeCheck. process(Node externsRoot, Node jsRoot)Main entry point for this phase of processing.voidWhitespaceWrapGoogModules. process(Node externs, Node root)TypedScopeTypeCheck. processForTesting(Node externsRoot, Node jsRoot)Main entry point of this phase for testing code.static voidNodeUtil. removeChild(Node parent, Node node)Safely remove children while maintaining a valid node structure.static voidNodeUtil. removeName(Node n)Set the given function/class node to an empty namestatic voidNodeUtil. replaceDeclarationChild(Node declChild, Node newStatement)Replace the child of a var/let/const declaration (usually a name) with a new statement.protected voidConformanceRules.AbstractRule. report(Node n, ConformanceRules.ConformanceResult result)Report a conformance warning for the given node.voidNodeTraversal. report(Node n, DiagnosticType diagnosticType, java.lang.String... arguments)Reports a diagnostic (error or warning)abstract voidAbstractCompiler. reportChangeToChangeScope(Node changeScopeRoot)Mark modifications in a scope that is different than the Compiler.currentScope use this (eg, InlineVariables and many others)voidCompiler. reportChangeToChangeScope(Node changeScopeRoot)abstract voidAbstractCompiler. reportChangeToEnclosingScope(Node n)Passes that make modifications in a scope that is different than the Compiler.currentScope use this (eg, InlineVariables and many others)voidCompiler. reportChangeToEnclosingScope(Node n)voidNodeTraversal. reportCodeChange(Node n)voidCompiler. reportFunctionDeleted(Node n)booleanCheckConformance. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckMissingAndExtraRequires. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckMissingRequires. shouldTraverse(NodeTraversal t, Node n, ModuleMetadataMap.ModuleMetadata currentModule, Node scopeRoot)booleanControlFlowAnalysis. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanControlFlowGraph.AbstractCfgNodeTraversalCallback. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanCrossChunkReferenceCollector. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanDartSuperAccessorsPass. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanEs6ConvertSuperConstructorCalls. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanEs6RewriteArrowFunction. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanEs6RewriteClass. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanEs6RewriteDestructuring. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanEs6RewriteModules. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanEs6RewriteScriptsToModules. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanEs7RewriteExponentialOperator. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanFindModuleDependencies. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanLateEs6ToEs3Converter. shouldTraverse(NodeTraversal t, Node n, Node parent)protected booleanNodeTraversal.AbstractModuleCallback. shouldTraverse(NodeTraversal t, Node n, ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)booleanNodeTraversal.AbstractModuleCallback. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanNodeTraversal.AbstractPostOrderCallback. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanNodeTraversal.AbstractScopedCallback. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanNodeTraversal.AbstractShallowCallback. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanNodeTraversal.AbstractShallowStatementCallback. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanNodeTraversal.Callback. shouldTraverse(NodeTraversal t, Node n, Node parent)Visits a node in preorder (before its children) and decides whether its children should be traversed.booleanNodeTraversal.ExternsSkippingCallback. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanProcessCommonJSModules. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanReferenceCollectingCallback. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)Updates block stack.booleanRewriteAsyncFunctions. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanRewriteAsyncIteration. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanRewriteNullishCoalesceOperator. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanRewriteObjectSpread. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanTypeCheck. shouldTraverse(NodeTraversal t, Node n, Node parent)voidEs6SplitVariableDeclarations. splitDeclaration(NodeTraversal t, Node n, Node parent)static java.lang.StringDotFormatter. toDot(Node n)Converts an AST to dot representation.abstract java.lang.StringAbstractCompiler. toSource(Node root)Prints a node to source code.voidCompiler. toSource(Compiler.CodeBuilder cb, int inputSeqNum, Node root)Writes out JS code from a root node.java.lang.StringCompiler. toSource(Node n)Generates JavaScript source code for an AST, doesn't generate source map info.static voidNodeTraversal. traverse(AbstractCompiler compiler, Node root, NodeTraversal.Callback cb)Traverses using the SyntacticScopeCreatorvoidNodeTraversal. traverse(Node root)Traverses a parse tree recursively.voidNodeTraversal. traverseFunctionOutOfBand(Node node, AbstractScope<?,?> scope)Traverse a function out-of-band of normal traversal.static voidNodeTraversal. traversePostOrder(AbstractCompiler compiler, Node root, NodeTraversal.AbstractPostOrderCallbackInterface cb)Traverses in post order.static voidNodeTraversal. traverseRoots(AbstractCompiler compiler, NodeTraversal.Callback cb, Node externs, Node root)static voidNodeTraversal. traverseScopeRoots(AbstractCompiler compiler, Node root, java.util.List<Node> scopeNodes, NodeTraversal.Callback cb, boolean traverseNested)Traverses *just* the contents of provided scope nodes (and optionally scopes nested within them) but will fall back on traversing the entire AST from root if a null scope nodes list is provided.static voidNodeTraversal. traverseScopeRoots(AbstractCompiler compiler, Node root, java.util.List<Node> scopeNodes, NodeTraversal.Callback cb, NodeTraversal.ChangeScopeRootCallback changeCallback, boolean traverseNested)Traverses *just* the contents of provided scope nodes (and optionally scopes nested within them) but will fall back on traversing the entire AST from root if a null scope nodes list is provided.static booleanNodeUtil. tryMergeBlock(Node block, boolean alwaysMerge)Merge a block with its parent block.static voidGatherGetterAndSetterProperties. update(AbstractCompiler compiler, Node externs, Node root)Gathers all getters and setters in the AST.voidAstValidator. validateCodeRoot(Node n)voidAstValidator. validateExpression(Node n)voidAstValidator. validateModuleContents(Node n)voidAstValidator. validateRoot(Node n)voidAstValidator. validateScript(Node n)voidAstValidator. validateStatement(Node n)voidAstValidator. validateStatement(Node n, boolean isAmbient)Validates a statement node and its children.voidAstValidator. validateStatements(Node n)voidCheckConformance. visit(NodeTraversal t, Node n, Node parent)voidCheckMissingAndExtraRequires. visit(NodeTraversal t, Node n, Node parent)voidCheckMissingRequires. visit(NodeTraversal t, Node n, ModuleMetadataMap.ModuleMetadata currentModule, Node scopeRoot)voidCheckTypeImportCodeReferences. visit(NodeTraversal t, Node n, Node parent)voidChromePass. visit(NodeTraversal t, Node node, Node parent)protected voidClosureCheckModule. visit(NodeTraversal t, Node n, ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)voidControlFlowAnalysis. visit(NodeTraversal t, Node n, Node parent)voidCrossChunkReferenceCollector. visit(NodeTraversal t, Node n, Node parent)For each node, update the block stack and reference collection as appropriate.voidDartSuperAccessorsPass. visit(NodeTraversal t, Node n, Node parent)voidEs6CheckModule. visit(NodeTraversal t, Node n, Node parent)voidEs6ConvertSuper. visit(NodeTraversal t, Node n, Node parent)voidEs6ConvertSuperConstructorCalls. visit(NodeTraversal t, Node n, Node parent)voidEs6ExtractClasses. visit(NodeTraversal t, Node n, Node parent)voidEs6ForOfConverter. visit(NodeTraversal t, Node n, Node parent)voidEs6NormalizeShorthandProperties. visit(NodeTraversal t, Node n, Node parent)voidEs6RenameVariablesInParamLists. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteArrowFunction. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteBlockScopedDeclaration. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteBlockScopedFunctionDeclaration. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteClass. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteClassExtendsExpressions. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteDestructuring. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteModules. visit(NodeTraversal t, Node n, Node parent)voidEs6RewriteRestAndSpread. visit(NodeTraversal traversal, Node current, Node parent)voidEs6SplitVariableDeclarations. visit(NodeTraversal t, Node n, Node parent)voidEs7RewriteExponentialOperator. visit(NodeTraversal t, Node n, Node parent)voidFindModuleDependencies. visit(NodeTraversal t, Node n, Node parent)voidImplicitNullabilityCheck. visit(NodeTraversal t, Node n, Node p)Crawls the JSDoc of the given node to find any names in JSDoc that are implicitly null.voidInjectTranspilationRuntimeLibraries. visit(NodeTraversal t, Node n, Node parent)voidJ2clAssertRemovalPass. visit(NodeTraversal t, Node node, Node parent)voidJ2clChecksPass. visit(NodeTraversal unused, Node n, Node parent)voidJ2clUtilGetDefineRewriterPass. visit(NodeTraversal t, Node n, Node parent)voidJsMessageVisitor. visit(NodeTraversal traversal, Node node, Node unused)voidLateEs6ToEs3Converter. visit(NodeTraversal t, Node n, Node parent)voidMarkUntranspilableFeaturesAsRemoved. visit(NodeTraversal t, Node n, Node parent)protected voidNodeTraversal.AbstractModuleCallback. visit(NodeTraversal t, Node n, ModuleMetadataMap.ModuleMetadata currentModule, Node moduleScopeRoot)voidNodeTraversal.AbstractModuleCallback. visit(NodeTraversal t, Node n, Node parent)voidNodeTraversal.AbstractPostOrderCallbackInterface. visit(NodeTraversal t, Node n, Node parent)voidNodeTraversal.AbstractPreOrderCallback. visit(NodeTraversal t, Node n, Node parent)voidNodeTraversal.Callback. visit(NodeTraversal t, Node n, Node parent)Visits a node in postorder (after its children).voidNodeUtil.Visitor. visit(Node node)voidReferenceCollectingCallback. visit(NodeTraversal t, Node n, Node parent)For each node, update the block stack and reference collection as appropriate.voidRewriteAsyncFunctions. visit(NodeTraversal t, Node n, Node parent)voidRewriteAsyncIteration. visit(NodeTraversal t, Node n, Node parent)voidRewriteJsonToModule. visit(NodeTraversal t, Node n, Node parent)voidRewriteNullishCoalesceOperator. visit(NodeTraversal t, Node n, Node parent)voidRewriteObjectSpread. visit(NodeTraversal t, Node n, Node parent)voidTypeCheck. visit(NodeTraversal t, Node n, Node parent)This is the meat of the type checking.static voidNodeUtil. visitPostOrder(Node node, NodeUtil.Visitor visitor)A post-order traversal, calling Visitor.visit for each decendent.static voidNodeUtil. visitPostOrder(Node node, NodeUtil.Visitor visitor, com.google.common.base.Predicate<Node> traverseChildrenPred)A post-order traversal, calling Visitor.visit for each node in the tree.static voidNodeUtil. visitPreOrder(Node node, NodeUtil.Visitor visitor)A pre-order traversal, calling Visitor.visit for each decendent.static voidNodeUtil. visitPreOrder(Node node, NodeUtil.Visitor visitor, com.google.common.base.Predicate<Node> traverseChildrenPred)A pre-order traversal, calling Visitor.visit for each node in the tree.Method parameters in com.google.javascript.jscomp with type arguments of type Node Modifier and Type Method Description static NodeNodeUtil. findPreorder(Node node, com.google.common.base.Predicate<Node> pred, com.google.common.base.Predicate<Node> traverseChildrenPred)Returns the first Node matching the given pred via a pre-order traversal.static intNodeUtil. getCount(Node n, com.google.common.base.Predicate<Node> pred, com.google.common.base.Predicate<Node> traverseChildrenPred)static NodeNodeUtil. getEnclosingNode(Node n, com.google.common.base.Predicate<Node> pred)static voidNodeUtil. getParamOrPatternNames(Node n, java.util.function.Consumer<Node> cb)Callscbwith all NAMEs declared in a PARAM_LIST or destructuring pattern.static java.util.List<Node>NodeUtil. getParentChangeScopeNodes(java.util.List<Node> scopeNodes)Returns the list of scope nodes which are parents of the provided list of scope nodes.static booleanNodeUtil. has(Node node, com.google.common.base.Predicate<Node> pred, com.google.common.base.Predicate<Node> traverseChildrenPred)static java.lang.Iterable<Node>NodeUtil. preOrderIterable(Node root, com.google.common.base.Predicate<Node> travserseNodePredicate)Create anIterableover the given node and all descendents.static java.util.List<Node>NodeUtil. removeNestedChangeScopeNodes(java.util.List<Node> scopeNodes)Removes any scope nodes from the provided list that are nested within some other scope node also in the list.static voidNodeTraversal. traverseScopeRoots(AbstractCompiler compiler, Node root, java.util.List<Node> scopeNodes, NodeTraversal.Callback cb, boolean traverseNested)Traverses *just* the contents of provided scope nodes (and optionally scopes nested within them) but will fall back on traversing the entire AST from root if a null scope nodes list is provided.static voidNodeTraversal. traverseScopeRoots(AbstractCompiler compiler, Node root, java.util.List<Node> scopeNodes, NodeTraversal.Callback cb, NodeTraversal.ChangeScopeRootCallback changeCallback, boolean traverseNested)Traverses *just* the contents of provided scope nodes (and optionally scopes nested within them) but will fall back on traversing the entire AST from root if a null scope nodes list is provided.static voidNodeUtil. visitPostOrder(Node node, NodeUtil.Visitor visitor, com.google.common.base.Predicate<Node> traverseChildrenPred)A post-order traversal, calling Visitor.visit for each node in the tree.static voidNodeUtil. visitPreOrder(Node node, NodeUtil.Visitor visitor, com.google.common.base.Predicate<Node> traverseChildrenPred)A pre-order traversal, calling Visitor.visit for each node in the tree.InvalidatingTypes.BuilderInvalidatingTypes.Builder. writeInvalidationsInto(com.google.common.collect.Multimap<JSType,Node> invalidationMap)Constructors in com.google.javascript.jscomp with parameters of type Node Constructor Description Bind(Node target, Node thisValue, Node parameters)Builder(Node node)Sets the root node from which to generate the source code.Cache(Node cacheObj, Node key, Node valueFn, Node keyFn)SubclassRelationship(CodingConvention.SubclassType type, Node subclassNode, Node superclassNode)SyntheticAst(Node root)TemplateAstMatcher(AbstractCompiler compiler, Node templateFunctionNode, TypeMatchingStrategy typeMatchingStrategy)Constructs this matcher with a Function node that serves as the template to match all other nodes against. -
Uses of Node in com.google.javascript.jscomp.disambiguate
Methods in com.google.javascript.jscomp.disambiguate with parameters of type Node Modifier and Type Method Description voidAmbiguateProperties. process(Node externs, Node root)voidDisambiguateProperties. process(Node externs, Node root)voidDisambiguateProperties2. process(Node externs, Node root) -
Uses of Node in com.google.javascript.jscomp.ijs
Methods in com.google.javascript.jscomp.ijs with parameters of type Node Modifier and Type Method Description voidConvertToTypedInterface. process(Node externs, Node root) -
Uses of Node in com.google.javascript.jscomp.instrumentation
Methods in com.google.javascript.jscomp.instrumentation with parameters of type Node Modifier and Type Method Description voidCoverageInstrumentationPass. process(Node externsNode, Node rootNode)voidBranchCoverageInstrumentationCallback. visit(NodeTraversal traversal, Node node, Node parent) -
Uses of Node in com.google.javascript.jscomp.lint
Methods in com.google.javascript.jscomp.lint that return Node Modifier and Type Method Description NodeCheckProvidesSorted. getFirstNode()Returns the node for the first recognized provide statement.NodeCheckRequiresSorted. getFirstNode()Returns the node for the first recognized import statement.NodeCheckProvidesSorted. getLastNode()Returns the node for the last recognized provide statement.NodeCheckRequiresSorted. getLastNode()Returns the node for the last recognized import statement.Methods in com.google.javascript.jscomp.lint with parameters of type Node Modifier and Type Method Description static booleanCheckNullableReturn. hasReturnDeclaredNullable(Node n)voidCheckArrayWithGoogObject. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckConstantCaseNames. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckDuplicateCase. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckExtraRequires. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckInterfaces. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckNullableReturn. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckPrimitiveAsObject. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckPrototypeProperties. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckUnusedLabels. hotSwapScript(Node scriptRoot, Node originalRoot)voidCheckUselessBlocks. hotSwapScript(Node scriptRoot, Node originalRoot)booleanCheckArrayWithGoogObject. isGoogObjectIterationOverArray(Node n)voidCheckArrayWithGoogObject. process(Node externs, Node root)voidCheckConstantCaseNames. process(Node externs, Node root)voidCheckDuplicateCase. process(Node externs, Node root)voidCheckEmptyStatements. process(Node externs, Node root)voidCheckEnums. process(Node externs, Node root)voidCheckEs6ModuleFileStructure. process(Node externs, Node root)voidCheckEs6Modules. process(Node externs, Node root)voidCheckExtraRequires. process(Node externs, Node root)voidCheckInterfaces. process(Node externs, Node root)voidCheckJSDocStyle. process(Node externs, Node root)voidCheckMissingSemicolon. process(Node externs, Node root)voidCheckNoMutatedEs6Exports. process(Node externs, Node root)voidCheckNullabilityModifiers. process(Node externs, Node root)voidCheckNullableReturn. process(Node externs, Node root)voidCheckPrimitiveAsObject. process(Node externs, Node root)voidCheckPrototypeProperties. process(Node externs, Node root)voidCheckUnusedLabels. process(Node externs, Node root)voidCheckUselessBlocks. process(Node externs, Node root)voidCheckVar. process(Node externs, Node root)booleanCheckConstantCaseNames. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckEs6ModuleFileStructure. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckEs6Modules. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckNoMutatedEs6Exports. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckNullableReturn. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanCheckPrototypeProperties. shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)booleanCheckProvidesSorted. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckRequiresSorted. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckUnusedLabels. shouldTraverse(NodeTraversal t, Node n, Node parent)booleanCheckUselessBlocks. shouldTraverse(NodeTraversal t, Node n, Node parent)voidCheckArrayWithGoogObject. visit(NodeTraversal unused, Node n, Node parent)voidCheckConstantCaseNames. visit(NodeTraversal t, Node n, Node parent)voidCheckDuplicateCase. visit(NodeTraversal t, Node n, Node parent)voidCheckEmptyStatements. visit(NodeTraversal t, Node n, Node parent)voidCheckEnums. visit(NodeTraversal t, Node n, Node parent)voidCheckEs6Modules. visit(NodeTraversal t, Node n, Node parent)voidCheckExtraRequires. visit(NodeTraversal t, Node n, Node parent)voidCheckInterfaces. visit(NodeTraversal t, Node n, Node parent)voidCheckJSDocStyle. visit(NodeTraversal t, Node n, Node unused)voidCheckMissingSemicolon. visit(NodeTraversal t, Node n, Node parent)voidCheckNoMutatedEs6Exports. visit(NodeTraversal t, Node n, Node parent)voidCheckNullabilityModifiers. visit(NodeTraversal t, Node n, Node parent)voidCheckNullableReturn. visit(NodeTraversal t, Node n, Node parent)voidCheckPrimitiveAsObject. visit(NodeTraversal t, Node n, Node parent)voidCheckPrototypeProperties. visit(NodeTraversal unused, Node n, Node parent)voidCheckProvidesSorted. visit(NodeTraversal t, Node n, Node parent)voidCheckRequiresSorted. visit(NodeTraversal t, Node n, Node parent)voidCheckUnusedLabels. visit(NodeTraversal t, Node n, Node parent)voidCheckUselessBlocks. visit(NodeTraversal t, Node n, Node parent)voidCheckVar. visit(NodeTraversal t, Node n, Node parent)Method parameters in com.google.javascript.jscomp.lint with type arguments of type Node Modifier and Type Method Description static booleanCheckNullableReturn. canReturnNull(ControlFlowGraph<Node> graph) -
Uses of Node in com.google.javascript.jscomp.modules
Methods in com.google.javascript.jscomp.modules that return Node Modifier and Type Method Description abstract NodeExport. exportNode()Node that this export originates from.abstract NodeImport. importNode()Returns the import node for source information.abstract NodeExport. nameNode()Node that this export originates from.abstract NodeImport. nameNode()Returns the name node for source information.abstract NodeModuleMetadataMap.ModuleMetadata. rootNode()AST node that represents the root of this module.abstract NodeBinding. sourceNode()The AST node to use for source location when rewriting.Methods in com.google.javascript.jscomp.modules with parameters of type Node Modifier and Type Method Description voidModuleMapCreator. hotSwapScript(Node scriptRoot, Node originalRoot)com.google.javascript.jscomp.modules.UnresolvedModuleEsModuleProcessor. process(ModuleMetadataMap.ModuleMetadata metadata, ModuleLoader.ModulePath path, Node script)voidModuleMapCreator. process(Node externs, Node root)abstract ModuleMetadataMap.ModuleMetadata.BuilderModuleMetadataMap.ModuleMetadata.Builder. rootNode(Node root)booleanEsModuleProcessor. shouldTraverse(NodeTraversal t, Node n, Node parent)voidEsModuleProcessor. visit(NodeTraversal t, Node n, Node parent) -
Uses of Node in com.google.javascript.jscomp.parsing
Fields in com.google.javascript.jscomp.parsing declared as Node Modifier and Type Field Description NodeParserRunner.ParseResult. astMethods in com.google.javascript.jscomp.parsing that return Node Modifier and Type Method Description NodeTypeTransformationParser. getTypeTransformationAst()static NodeJsDocInfoParser. parseTypeString(java.lang.String typeString)Parses a string containing a JsDoc type declaration, returning the type if the parsing succeeded ornullif it failed.Methods in com.google.javascript.jscomp.parsing with parameters of type Node Modifier and Type Method Description static voidParsingUtil. getParamOrPatternNames(Node n, java.util.function.Consumer<Node> cb)Callscbwith all NAMEs declared in a PARAM_LIST or destructuring pattern.Method parameters in com.google.javascript.jscomp.parsing with type arguments of type Node Modifier and Type Method Description static voidParsingUtil. getParamOrPatternNames(Node n, java.util.function.Consumer<Node> cb)Callscbwith all NAMEs declared in a PARAM_LIST or destructuring pattern.Constructors in com.google.javascript.jscomp.parsing with parameters of type Node Constructor Description JsDocInfoParser(JsDocTokenStream stream, java.lang.String comment, int commentPosition, Node templateNode, Config config, ErrorReporter errorReporter)ParseResult(Node ast, java.util.List<Comment> comments, FeatureSet features, java.lang.String sourceMapURL) -
Uses of Node in com.google.javascript.jscomp.serialization
Methods in com.google.javascript.jscomp.serialization with parameters of type Node Modifier and Type Method Description voidConvertTypesToColors. process(Node externs, Node root) -
Uses of Node in com.google.javascript.jscomp.type
Methods in com.google.javascript.jscomp.type with parameters of type Node Modifier and Type Method Description protected FlowScopeChainableReverseAbstractInterpreter. declareNameInScope(FlowScope scope, Node node, JSType type)Declares a refined type inscopefor the name represented bynode.protected FlowScopeChainableReverseAbstractInterpreter. firstPreciserScopeKnowingConditionOutcome(Node condition, FlowScope blindScope, Outcome outcome)Calculates the preciser scope starting with the first link.FlowScopeClosureReverseAbstractInterpreter. getPreciserScopeKnowingConditionOutcome(Node condition, FlowScope blindScope, Outcome outcome)FlowScopeReverseAbstractInterpreter. getPreciserScopeKnowingConditionOutcome(Node condition, FlowScope blindScope, Outcome outcome)Calculates a precise version of the scope knowing the outcome of the condition.FlowScopeSemanticReverseAbstractInterpreter. getPreciserScopeKnowingConditionOutcome(Node condition, FlowScope blindScope, Outcome outcome)protected JSTypeChainableReverseAbstractInterpreter. getTypeIfRefinable(Node node, FlowScope scope)Returns the type of a node in the given scope if the node corresponds to a name whose type is capable of being refined.FlowScopeFlowScope. inferQualifiedSlot(Node node, java.lang.String symbol, JSType bottomType, JSType inferredType, boolean declare)Returns a flow scope with the type of the givensymbolupdated toinferredType.protected FlowScopeChainableReverseAbstractInterpreter. nextPreciserScopeKnowingConditionOutcome(Node condition, FlowScope blindScope, Outcome outcome)Delegates the calculation of the preciser scope to the next link. -
Uses of Node in com.google.javascript.refactoring
Methods in com.google.javascript.refactoring that return Node Modifier and Type Method Description NodeMatch. getNode()Returns the node that matched the given conditions.Methods in com.google.javascript.refactoring that return types with arguments of type Node Modifier and Type Method Description java.util.Map<java.lang.String,Node>JsSourceMatcher. getTemplateNodeToMatchMap()Returns a map from named template node strings to Nodes that were the equivalent matches from the last matched template.Methods in com.google.javascript.refactoring with parameters of type Node Modifier and Type Method Description SuggestedFix.BuilderSuggestedFix.Builder. addCast(Node n, AbstractCompiler compiler, java.lang.String type)Adds a cast of the given type to the provided node.SuggestedFix.BuilderSuggestedFix.Builder. addChildToFront(Node parentNode, java.lang.String content)Inserts a new node as the first child of the provided node.SuggestedFix.BuilderSuggestedFix.Builder. addOrReplaceJsDoc(Node n, java.lang.String newJsDoc)Adds or replaces the JS Doc for the given node.SuggestedFix.BuilderSuggestedFix.Builder. attachMatchedNodeInfo(Node node, AbstractCompiler compiler)Sets the node on this SuggestedFix that caused this SuggestedFix to be built in the first place.SuggestedFix.BuilderSuggestedFix.Builder. changeJsDocType(Node n, AbstractCompiler compiler, java.lang.String type)Changes the JS Doc Type of the given node.static ScriptMetadataScriptMetadata. create(Node script, AbstractCompiler compiler)SuggestedFix.BuilderSuggestedFix.Builder. delete(Node n)Deletes a node and its contents from the source file.SuggestedFix.BuilderSuggestedFix.Builder. deleteArgument(Node n, int position)Deletes an argument from an existing function call, including any JS doc that precedes it.SuggestedFix.BuilderSuggestedFix.Builder. deleteWithoutRemovingWhitespace(Node n)Deletes a node without touching any surrounding whitespace.SuggestedFix.BuilderSuggestedFix.Builder. deleteWithoutRemovingWhitespaceBefore(Node n)Deletes a node and its contents from the source file.java.lang.StringSuggestedFix.Builder. generateCode(AbstractCompiler compiler, Node node)SuggestedFix.BuilderSuggestedFix.Builder. insertAfter(Node node, java.lang.String text)Inserts the text after the given nodeSuggestedFix.BuilderSuggestedFix.Builder. insertArguments(Node n, int position, java.lang.String... args)Inserts arguments into an existing function call.SuggestedFix.BuilderSuggestedFix.Builder. insertBefore(Node nodeToInsertBefore, Node n, AbstractCompiler compiler)Inserts a new node before the provided node.SuggestedFix.BuilderSuggestedFix.Builder. insertBefore(Node nodeToInsertBefore, java.lang.String content)Inserts a string before the provided node.static booleanRefactoringUtils. isInClosurizedFile(Node node, NodeMetadata metadata)Looks for a goog.require(), goog.provide() or goog.module() call in the node's file.booleanJsSourceMatcher. matches(Node n, NodeMetadata metadata)booleanMatcher. matches(Node n, NodeMetadata metadata)Returns true if the specifiedNodeandNodeMetadatamatch the given pattern.booleanRefasterJsScanner. matches(Node node, NodeMetadata metadata)abstract booleanScanner. matches(Node node, NodeMetadata t)Returns true if the given node and node traversal should match for this particular scanner.SuggestedFix.BuilderSuggestedFix.Builder. removeCast(Node n, AbstractCompiler compiler)Removes a cast from the given node.SuggestedFix.BuilderSuggestedFix.Builder. rename(Node n, java.lang.String name)Renames a given node to the provided name.SuggestedFix.BuilderSuggestedFix.Builder. rename(Node n, java.lang.String name, boolean replaceEntireName)Renames a given node to the provided name.SuggestedFix.BuilderSuggestedFix.Builder. replace(Node original, Node newNode, AbstractCompiler compiler)Replaces the provided node with new node in the source file.SuggestedFix.BuilderSuggestedFix.Builder. replaceRange(Node first, Node last, java.lang.String newContent)Replaces a range of nodes with the given content.Constructors in com.google.javascript.refactoring with parameters of type Node Constructor Description JsSourceMatcher(AbstractCompiler compiler, Node templateNode, TypeMatchingStrategy typeMatchingStrategy)Constructs this matcher with a Function node that serves as the template to match all other nodes against.Match(Node node, NodeMetadata metadata) -
Uses of Node in com.google.javascript.refactoring.examples
Methods in com.google.javascript.refactoring.examples with parameters of type Node Modifier and Type Method Description booleanGoogBindToArrow. matches(Node node, NodeMetadata metadata) -
Uses of Node in com.google.javascript.rhino
Subclasses of Node in com.google.javascript.rhino Modifier and Type Class Description static classNode.TypeDeclarationNodeRepresents a node in the type declaration AST.Fields in com.google.javascript.rhino declared as Node Modifier and Type Field Description protected NodeNode. parentMethods in com.google.javascript.rhino that return Node Modifier and Type Method Description static NodeIR. add(Node expr1, Node expr2)static NodeIR. and(Node expr1, Node expr2)static NodeIR. arraylit(Node... exprs)static NodeIR. arraylit(java.lang.Iterable<Node> exprs)static NodeIR. arrayPattern(Node... keys)static NodeIR. arrowFunction(Node name, Node params, Node body)static NodeIR. assign(Node target, Node expr)static NodeIR. await(Node expr)static NodeIR. bigint(java.math.BigInteger b)static NodeIR. block()static NodeIR. block(Node stmt)static NodeIR. block(Node... stmts)static NodeIR. block(java.util.List<Node> stmts)static NodeIR. breakNode()static NodeIR. breakNode(Node name)static NodeIR. call(Node target, Node... args)static NodeIR. caseNode(Node expr, Node body)static NodeIR. cast(Node expr1, JSDocInfo jsdoc)static NodeIR. catchNode(Node expr, Node body)NodeNode. cloneNode()protected NodeNode. cloneNode(boolean cloneTypeExprs)NodeNode. clonePropsFrom(Node other)Clone the properties from the provided node without copying the property object.NodeNode. cloneTree()NodeNode. cloneTree(boolean cloneTypeExprs)static NodeIR. coalesce(Node expr1, Node expr2)static NodeIR. comma(Node expr1, Node expr2)static NodeIR. computedProp(Node key, Node value)static NodeIR. constNode(Node lhs, Node value)static NodeIR. continueNode()static NodeIR. continueNode(Node name)static NodeIR. continueOptChainCall(Node target, Node... args)static NodeIR. continueOptChainGetelem(Node target, Node elem)static NodeIR. continueOptChainGetprop(Node target, Node prop)static NodeIR. dec(Node exp, boolean isPost)static NodeIR. declaration(Node lhs, Node value, Token type)static NodeIR. declaration(Node lhs, Token type)static NodeIR. defaultCase(Node body)static NodeIR. delprop(Node target)NodeNode. detach()Removes this node from its parent.NodeNode. detachFromParent()Deprecated.usedetach()instead.static NodeIR. doNode(Node body, Node cond)static NodeIR. empty()static NodeIR. eq(Node expr1, Node expr2)"=="static NodeIR. export(Node declaration)static NodeIR. exprResult(Node expr)static NodeIR. falseNode()static NodeIR. forIn(Node target, Node cond, Node body)static NodeIR. forNode(Node init, Node cond, Node incr, Node body)static NodeIR. function(Node name, Node params, Node body)static NodeIR. ge(Node expr1, Node expr2)">="NodeNode. getAncestor(int level)Gets the ancestor node relative to this.NodeNode. getChildAtIndex(int i)Gets the ith child, note that this is O(N) where N is the number of children.NodeNode. getChildBefore(Node child)static NodeIR. getelem(Node target, Node elem)NodeNode. getFirstChild()NodeNode. getFirstFirstChild()Get the first child of the first child.NodeNode. getGrandparent()NodeNode. getLastChild()NodeNode. getNext()NodeStaticRef. getNode()The node where the reference lives.NodeNode. getOnlyChild()NodeNode. getParent()NodeNode. getPrevious()static NodeIR. getprop(Node target, Node prop)static NodeIR. getprop(Node target, Node prop, Node... moreProps)static NodeIR. getprop(Node target, java.lang.String prop, java.lang.String... moreProps)NodeJSTypeExpression. getRoot()NodeStaticScope. getRootNode()Returns the root node associated with this scope.NodeNode. getSecondChild()static NodeIR. hook(Node cond, Node trueval, Node falseval)static NodeIR. ifNode(Node cond, Node then)static NodeIR. ifNode(Node cond, Node then, Node elseNode)static NodeIR. importMeta()static NodeIR. importNode(Node name, Node importSpecs, Node moduleIdentifier)static NodeIR. importStar(java.lang.String name)static NodeIR. in(Node expr1, Node expr2)static NodeIR. inc(Node exp, boolean isPost)static NodeIR. iterRest(Node target)static NodeIR. iterSpread(Node expr)static NodeIR. label(Node name, Node stmt)static NodeIR. labelName(java.lang.String name)static NodeIR. let(Node lhs)static NodeIR. let(Node lhs, Node value)static NodeIR. lt(Node expr1, Node expr2)"<"static NodeIR. memberFunctionDef(java.lang.String name, Node function)static NodeIR. name(java.lang.String name)static NodeIR. ne(Node expr1, Node expr2)"!="static NodeIR. neg(Node expr1)static NodeNode. newBigInt(java.math.BigInteger bigint)static NodeIR. newNode(Node target, Node... args)static NodeNode. newNumber(double number)static NodeNode. newNumber(double number, int lineno, int charno)static NodeNode. newString(Token token, java.lang.String str)static NodeNode. newString(Token token, java.lang.String str, int lineno, int charno)static NodeNode. newString(java.lang.String str)static NodeNode. newString(java.lang.String str, int lineno, int charno)static NodeNode. newTemplateLitString(java.lang.String cooked, java.lang.String raw)static NodeIR. not(Node expr1)static NodeIR. nullNode()static NodeIR. number(double d)static NodeIR. objectlit(Node... propdefs)static NodeIR. objectPattern(Node... keys)static NodeIR. objectRest(Node target)static NodeIR. objectSpread(Node expr)static NodeIR. or(Node expr1, Node expr2)static NodeIR. paramList(Node... params)static NodeIR. pos(Node expr1)static NodeIR. propdef(Node string, Node value)static NodeIR. quotedStringKey(java.lang.String s, Node value)static NodeIR. regexp(Node expr)static NodeIR. regexp(Node expr, Node flags)NodeNode. removeChildAfter(Node prev)NodeNode. removeChildren()NodeNode. removeFirstChild()Removes the first child of Node.NodeNode. removeFirstOrChildAfter(Node prev)Remove the child after the given child, or the first child if given null.static NodeIR. returnNode()static NodeIR. returnNode(Node expr)static NodeIR. root(Node... rootChildren)static NodeIR. script()static NodeIR. script(Node... stmts)static NodeIR. script(java.util.List<Node> stmts)NodeNode. setColor(Color jstype)NodeNode. setJSDocInfo(JSDocInfo info)Sets theJSDocInfoattached to this node.NodeNode. setJSType(JSType jstype)NodeNode. setNonJSDocComment(NonJSDocComment comment)Sets the NonJSDoc comment attached to this node.NodeNode. setStaticSourceFile(StaticSourceFile file)static NodeIR. sheq(Node expr1, Node expr2)"==="static NodeIR. shne(Node expr1, Node expr2)"!=="NodeNode. srcref(Node other)NodeNode. srcrefTree(Node other)static NodeIR. startOptChainCall(Node target, Node... args)static NodeIR. startOptChainGetelem(Node target, Node elem)static NodeIR. startOptChainGetprop(Node target, Node prop)static NodeIR. string(java.lang.String s)static NodeIR. stringKey(java.lang.String s)static NodeIR. stringKey(java.lang.String s, Node value)static NodeIR. sub(Node expr1, Node expr2)static NodeIR. superNode()static NodeIR. switchNode(Node cond, Node... cases)static NodeIR. thisNode()static NodeIR. throwNode(Node expr)static NodeIR. trueNode()static NodeIR. tryCatch(Node tryBody, Node catchNode)static NodeIR. tryCatchFinally(Node tryBody, Node catchNode, Node finallyBody)static NodeIR. tryFinally(Node tryBody, Node finallyBody)static NodeIR. typeof(Node expr)NodeNode. useSourceInfoFrom(Node other)Overwrite all the source information in this node with that ofother.NodeNode. useSourceInfoFromForTree(Node other)Overwrite all the source information in this node and its subtree with that ofother.NodeNode. useSourceInfoIfMissingFrom(Node other)Overwrite all the source information in this node with that ofotheriff the source info is missing.NodeNode. useSourceInfoIfMissingFromForTree(Node other)Overwrite all the source information in this node and its subtree with that ofotheriff the source info is missing.static NodeIR. var(Node lhs)static NodeIR. var(Node lhs, Node value)static NodeIR. voidNode(Node expr1)static NodeIR. whileNode(Node cond, Node body)static NodeIR. yield()static NodeIR. yield(Node expr)Methods in com.google.javascript.rhino that return types with arguments of type Node Modifier and Type Method Description java.lang.Iterable<Node>Node. children()Return an iterable object that iterates over this node's children.com.google.common.collect.ImmutableList<Node>JSTypeExpression. getAllTypeNodes()Returns a list of all type nodes in this type expression.java.util.Collection<Node>JSDocInfo. getTypeNodes()Returns a collection of all type nodes that are a part of this JSDocInfo.com.google.common.collect.ImmutableMap<java.lang.String,Node>JSDocInfo. getTypeTransformations()Gets the type transformations.java.util.Iterator<Node>Node.AncestorIterable. iterator()java.lang.Iterable<Node>Node. siblings()Return an iterable object that iterates over this node's siblings, including this Node but not any siblings that are before this one.Methods in com.google.javascript.rhino with parameters of type Node Modifier and Type Method Description static NodeIR. add(Node expr1, Node expr2)voidNode. addChildAfter(Node newChild, Node node)Add 'newChild' after 'node'.voidNode. addChildBefore(Node newChild, Node node)Add 'child' before 'node'.voidNode. addChildrenAfter(Node children, Node node)Add all children after 'node'.voidNode. addChildrenToBack(Node children)voidNode. addChildrenToFront(Node children)Add all children to the front of this node.voidNode. addChildToBack(Node child)voidNode. addChildToFront(Node child)static NodeIR. and(Node expr1, Node expr2)static NodeIR. arraylit(Node... exprs)static NodeIR. arrayPattern(Node... keys)static Node.TypeDeclarationNodeTypeDeclarationsIR. arrayType(Node elementType)Represents an array type.static NodeIR. arrowFunction(Node name, Node params, Node body)static NodeIR. assign(Node target, Node expr)static NodeIR. await(Node expr)static NodeIR. block(Node stmt)static NodeIR. block(Node... stmts)static NodeIR. breakNode(Node name)static NodeIR. call(Node target, Node... args)static NodeIR. caseNode(Node expr, Node body)static NodeIR. cast(Node expr1, JSDocInfo jsdoc)static NodeIR. catchNode(Node expr, Node body)NodeNode. clonePropsFrom(Node other)Clone the properties from the provided node without copying the property object.static NodeIR. coalesce(Node expr1, Node expr2)static NodeIR. comma(Node expr1, Node expr2)static NodeIR. computedProp(Node key, Node value)static NodeIR. constNode(Node lhs, Node value)static NodeIR. continueNode(Node name)static NodeIR. continueOptChainCall(Node target, Node... args)static NodeIR. continueOptChainGetelem(Node target, Node elem)static NodeIR. continueOptChainGetprop(Node target, Node prop)static NodeIR. dec(Node exp, boolean isPost)static NodeIR. declaration(Node lhs, Node value, Token type)static NodeIR. declaration(Node lhs, Token type)voidNominalTypeBuilder. declareConstructorProperty(java.lang.String name, JSType type, Node defSite)Declares a static property on the nominal type's constructor.voidNominalTypeBuilder. declareInstanceProperty(java.lang.String name, JSType type, Node defSite)Declares an instance property on the nominal type.voidNominalTypeBuilder. declarePrototypeProperty(java.lang.String name, JSType type, Node defSite)Declares a property on the nominal type's prototype.static NodeIR. defaultCase(Node body)static NodeIR. delprop(Node target)static NodeIR. doNode(Node body, Node cond)static NodeIR. eq(Node expr1, Node expr2)"=="static NodeIR. export(Node declaration)static NodeIR. exprResult(Node expr)static NodeIR. forIn(Node target, Node cond, Node body)static NodeIR. forNode(Node init, Node cond, Node incr, Node body)static NodeIR. function(Node name, Node params, Node body)static Node.TypeDeclarationNodeTypeDeclarationsIR. functionType(Node returnType, java.util.LinkedHashMap<java.lang.String,Node.TypeDeclarationNode> requiredParams, java.util.LinkedHashMap<java.lang.String,Node.TypeDeclarationNode> optionalParams, java.lang.String restName, Node.TypeDeclarationNode restType)Represents a function type.static NodeIR. ge(Node expr1, Node expr2)">="NodeNode. getChildBefore(Node child)static NodeIR. getelem(Node target, Node elem)intNode. getIndexOfChild(Node child)Gets the index of a child, note that this is O(N) where N is the number of children.static NodeIR. getprop(Node target, Node prop)static NodeIR. getprop(Node target, Node prop, Node... moreProps)static NodeIR. getprop(Node target, java.lang.String prop, java.lang.String... moreProps)booleanNode. hasChild(Node child)static NodeIR. hook(Node cond, Node trueval, Node falseval)static NodeIR. ifNode(Node cond, Node then)static NodeIR. ifNode(Node cond, Node then, Node elseNode)static NodeIR. importNode(Node name, Node importSpecs, Node moduleIdentifier)static NodeIR. in(Node expr1, Node expr2)static NodeIR. inc(Node exp, boolean isPost)booleanNode. isDescendantOf(Node node)booleanNode. isEquivalentTo(Node node)Returns true if this node is equivalent semantically to anotherbooleanNode. isEquivalentTo(Node node, boolean compareType, boolean recurse, boolean jsDoc, boolean sideEffect)booleanNode. isEquivalentToShallow(Node node)Checks equivalence without going into child nodesbooleanNode. isEquivalentToTyped(Node node)Returns true if this node is equivalent semantically to another and the types are equivalent.booleanNode. isEquivalentWithSideEffectsTo(Node node)Returns true if this node is equivalent semantically to another including side effects.booleanNode. isEquivalentWithSideEffectsToShallow(Node node)Returns true if this node is equivalent semantically to another including side effects.booleanNode. isFirstChildOf(Node possibleParent)booleanNode. isOnlyChildOf(Node possibleParent)booleanNode. isSecondChildOf(Node possibleParent)static NodeIR. iterRest(Node target)static NodeIR. iterSpread(Node expr)static NodeIR. label(Node name, Node stmt)static NodeIR. let(Node lhs)static NodeIR. let(Node lhs, Node value)static NodeIR. lt(Node expr1, Node expr2)"<"voidJSDocInfoBuilder. markName(java.lang.String name, Node templateNode, int lineno, int charno)Adds a name declaration to the current marker.voidJSDocInfoBuilder. markTypeNode(Node typeNode, int lineno, int startCharno, int endLineno, int endCharno, boolean hasLC)Adds a type declaration to the current marker.abstract booleanQualifiedName. matches(Node n)Checks whether the given node matches this name.booleanNode. matchesName(Node n)Check that if two NAME node match, returns false if either node is not a NAME node.booleanNode. matchesQualifiedName(Node n)Returns whether a node matches a simple or a qualified name, such asxora.b.corthis.a.static booleanIR. mayBeExpression(Node n)It isn't possible to always determine if a detached node is a expression, so make a best guess.static booleanIR. mayBeStatement(Node n)It isn't possible to always determine if a detached node is a expression, so make a best guess.static NodeIR. memberFunctionDef(java.lang.String name, Node function)static NodeIR. ne(Node expr1, Node expr2)"!="static NodeIR. neg(Node expr1)static NodeIR. newNode(Node target, Node... args)static NodeIR. not(Node expr1)static NodeIR. objectlit(Node... propdefs)static NodeIR. objectPattern(Node... keys)static NodeIR. objectRest(Node target)static NodeIR. objectSpread(Node expr)static NodeIR. or(Node expr1, Node expr2)static NodeIR. paramList(Node... params)static NodeIR. pos(Node expr1)static NodeIR. propdef(Node string, Node value)static NodeIR. quotedStringKey(java.lang.String s, Node value)booleanJSDocInfoBuilder. recordTypeTransformation(java.lang.String name, Node expr)Records a type transformation expression together with its template type name.static NodeIR. regexp(Node expr)static NodeIR. regexp(Node expr, Node flags)voidNode. removeChild(Node child)Detach a child from its parent and siblings.NodeNode. removeChildAfter(Node prev)NodeNode. removeFirstOrChildAfter(Node prev)Remove the child after the given child, or the first child if given null.voidNode. replaceChild(Node child, Node newChild)Detaches child from Node and replaces it with newChild.voidNode. replaceChildAfter(Node prevChild, Node newChild)voidNode. replaceFirstOrChildAfter(Node prev, Node newChild)Detaches the child after the given child, or the first child if prev is null.voidNode. replaceWith(Node newNode)Detaches Node and replaces it with newNode.static NodeIR. returnNode(Node expr)static NodeIR. root(Node... rootChildren)static NodeIR. script(Node... stmts)voidNode. setStaticSourceFileFrom(Node other)static NodeIR. sheq(Node expr1, Node expr2)"==="static NodeIR. shne(Node expr1, Node expr2)"!=="NodeNode. srcref(Node other)NodeNode. srcrefTree(Node other)static NodeIR. startOptChainCall(Node target, Node... args)static NodeIR. startOptChainGetelem(Node target, Node elem)static NodeIR. startOptChainGetprop(Node target, Node prop)static NodeIR. stringKey(java.lang.String s, Node value)static NodeIR. sub(Node expr1, Node expr2)static NodeIR. switchNode(Node cond, Node... cases)static NodeIR. throwNode(Node expr)static NodeIR. tryCatch(Node tryBody, Node catchNode)static NodeIR. tryCatchFinally(Node tryBody, Node catchNode, Node finallyBody)static NodeIR. tryFinally(Node tryBody, Node finallyBody)static NodeIR. typeof(Node expr)NodeNode. useSourceInfoFrom(Node other)Overwrite all the source information in this node with that ofother.NodeNode. useSourceInfoFromForTree(Node other)Overwrite all the source information in this node and its subtree with that ofother.NodeNode. useSourceInfoIfMissingFrom(Node other)Overwrite all the source information in this node with that ofotheriff the source info is missing.NodeNode. useSourceInfoIfMissingFromForTree(Node other)Overwrite all the source information in this node and its subtree with that ofotheriff the source info is missing.static NodeIR. var(Node lhs)static NodeIR. var(Node lhs, Node value)static NodeIR. voidNode(Node expr1)static NodeIR. whileNode(Node cond, Node body)static NodeIR. yield(Node expr)Method parameters in com.google.javascript.rhino with type arguments of type Node Modifier and Type Method Description static NodeIR. arraylit(java.lang.Iterable<Node> exprs)static NodeIR. block(java.util.List<Node> stmts)static NodeIR. script(java.util.List<Node> stmts)Constructors in com.google.javascript.rhino with parameters of type Node Constructor Description JSTypeExpression(Node root, java.lang.String sourceName)Node(Token nodeType, Node child)Node(Token nodeType, Node child, int lineno, int charno)Node(Token nodeType, Node left, Node right)Node(Token nodeType, Node left, Node mid, Node right)TypeDeclarationNode(Token nodeType, Node child) -
Uses of Node in com.google.javascript.rhino.jstype
Methods in com.google.javascript.rhino.jstype that return Node Modifier and Type Method Description NodeProperty. getNode()NodeSimpleReference. getNode()NodeObjectType. getOwnPropertyDefSite(java.lang.String propertyName)NodeObjectType. getPropertyDefSite(java.lang.String propertyName)NodeObjectType. getPropertyNode(java.lang.String propertyName)Gets the node corresponding to the definition of the specified property.NodeEnumType. getSource()NodeFunctionType. getSource()Gets the source node or null if this is an unknown function.NodeTemplateType. getTypeTransformation()Methods in com.google.javascript.rhino.jstype with parameters of type Node Modifier and Type Method Description RecordTypeBuilderRecordTypeBuilder. addProperty(java.lang.String name, JSType type, Node propertyNode)Adds a property with the given name and type to the record type.FunctionTypeJSTypeRegistry. createConstructorType(java.lang.String name, Node source, java.util.List<FunctionType.Parameter> parameters, JSType returnType, com.google.common.collect.ImmutableList<TemplateType> templateKeys, boolean isAbstract)Creates a constructor function type.EnumTypeJSTypeRegistry. createEnumType(java.lang.String name, Node source, JSType elementsType)Creates an enum type.FunctionTypeJSTypeRegistry. createInterfaceType(java.lang.String name, Node source, com.google.common.collect.ImmutableList<TemplateType> templateKeys, boolean struct)Creates an interface function type.TemplateTypeJSTypeRegistry. createTemplateTypeWithTransformation(java.lang.String name, Node expr)JSTypeJSTypeRegistry. createTypeFromCommentNode(Node n)JSTypeJSTypeRegistry. createTypeFromCommentNode(Node n, java.lang.String sourceName, StaticTypedScope scope)Creates a JSType from the nodes representing a type.booleanObjectType. defineDeclaredProperty(java.lang.String propertyName, JSType type, Node propertyNode)Defines a property whose type is explicitly declared by the programmer.booleanEnumType. defineElement(java.lang.String name, Node definingNode)Defines a new element on this enum.booleanObjectType. defineInferredProperty(java.lang.String propertyName, JSType type, Node propertyNode)Defines a property whose type is inferred.booleanObjectType. defineSynthesizedProperty(java.lang.String propertyName, JSType type, Node propertyNode)Defines a property whose type is on a synthesized object.java.lang.StringJSTypeRegistry. getReadableTypeName(Node n)First dereferences the JSType to remove null/undefined then returns a human-readable type namejava.lang.StringJSTypeRegistry. getReadableTypeNameNoDeref(Node n)voidJSTypeRegistry. registerClosureModule(java.lang.String moduleName, Node definitionNode, JSType type)Ensures that a type annotation pointing to a Closure modules is correctly resolved.voidJSTypeRegistry. registerTemplateTypeNamesInScope(java.lang.Iterable<TemplateType> keys, Node scopeRoot)Registers template types on the given scope root.voidProperty. setNode(Node n)voidObjectType. setPropertyNode(java.lang.String propertyName, Node defSite)Sets the node where the property was defined.voidPrototypeObjectType. setPropertyNode(java.lang.String propertyName, Node defSite)voidFunctionType. setSource(Node source)Sets the source node.FunctionType.BuilderFunctionType.Builder. withSourceNode(Node sourceNode)Set the source node of the function type.Constructors in com.google.javascript.rhino.jstype with parameters of type Node Constructor Description SimpleReference(T symbol, Node node)
-