Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.parsing |
Provides utilities to help with parsing JSDoc annotations and performing AST
transformations.
|
com.google.javascript.rhino |
The core AST from Rhino.
|
com.google.javascript.rhino.jstype |
Provides abstractions to represent types in JavaScript.
|
Modifier and Type | Method and Description |
---|---|
static JSDocInfo |
NodeUtil.getBestJSDocInfo(Node n)
Find the best JSDoc for the given node.
|
JSDocInfo |
SymbolTable.Symbol.getJSDocInfo() |
JSDocInfo |
AbstractVar.getJSDocInfo() |
JSDocInfo |
TypedScope.getJsdocOfTypeDeclaration(java.lang.String typeName) |
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableList<ImplicitNullabilityCheck.Result> |
ImplicitNullabilityCheck.findImplicitNullabilityResults(JSDocInfo info,
NodeTraversal t)
Finds and returns all the JSDoc nodes inside the given JSDoc object whose nullability is not
explict, using the NodeTraversal the necessary state (current scope, etc.)
|
static Node |
NodeUtil.newQNameDeclaration(AbstractCompiler compiler,
java.lang.String name,
Node value,
JSDocInfo info)
Creates a node representing a qualified name.
|
static Node |
NodeUtil.newQNameDeclaration(AbstractCompiler compiler,
java.lang.String name,
Node value,
JSDocInfo info,
Token type)
Creates a node representing a qualified name.
|
java.lang.String |
JSDocInfoPrinter.print(JSDocInfo info) |
Modifier and Type | Method and Description |
---|---|
static JSDocInfo |
JsDocInfoParser.parseFileOverviewJsdoc(java.lang.String toParse) |
JSDocInfo |
JsDocInfoParser.parseInlineTypeDoc()
Parse a description as a
@type . |
static JSDocInfo |
JsDocInfoParser.parseJsdoc(java.lang.String toParse)
Parses a string containing a JsDoc declaration, returning the entire JSDocInfo
if the parsing succeeded or
null if it failed. |
JSDocInfo |
JsDocInfoParser.retrieveAndResetParsedJSDocInfo() |
Modifier and Type | Method and Description |
---|---|
JSDocInfo |
JSDocInfoBuilder.build()
Builds a
JSDocInfo object based on the populated information and returns it. |
JSDocInfo |
JSDocInfoBuilder.build(boolean always)
Builds a
JSDocInfo object based on the populated information and
returns it. |
JSDocInfo |
JSDocInfoBuilder.buildAndReset()
Builds a
JSDocInfo object based on the populated information and
returns it. |
JSDocInfo |
JSDocInfo.clone() |
JSDocInfo |
JSDocInfo.clone(boolean cloneTypeNodes) |
JSDocInfo |
JSDocInfo.cloneAndReplaceTypeNames(java.util.Set<java.lang.String> names)
Clones this JSDoc but replaces the given names in any type related annotation with unknown
type.
|
JSDocInfo |
JSDocInfo.cloneWithNewType(boolean cloneTypeNodes,
JSTypeExpression typeExpression) |
JSDocInfo |
StaticSlot.getJSDocInfo()
Gets the JSDoc for this slot.
|
JSDocInfo |
Node.getJSDocInfo()
Get the
JSDocInfo attached to this node. |
Modifier and Type | Method and Description |
---|---|
static boolean |
JSDocInfo.areEquivalent(JSDocInfo jsDoc1,
JSDocInfo jsDoc2) |
static Node |
IR.cast(Node expr1,
JSDocInfo jsdoc) |
static JSDocInfoBuilder |
JSDocInfoBuilder.copyFrom(JSDocInfo info) |
static JSDocInfoBuilder |
JSDocInfoBuilder.copyFromWithNewType(JSDocInfo info,
JSTypeExpression typeExpression) |
static JSDocInfoBuilder |
JSDocInfoBuilder.maybeCopyFrom(JSDocInfo info) |
static JSDocInfoBuilder |
JSDocInfoBuilder.maybeCopyFromAndReplaceNames(JSDocInfo info,
java.util.Set<java.lang.String> moduleLocalNamesToReplace)
Returns a JSDocInfoBuilder that contains a JSDoc in which all module local types (which may be
inside
@param , @type or @returns are replaced with unknown. |
static JSDocInfoBuilder |
JSDocInfoBuilder.maybeCopyFromWithNewType(JSDocInfo info,
JSTypeExpression typeExpression)
Returns a JSDocInfoBuilder that contains a copy of the given JSDocInfo in which only the
@type field of the JSDocInfo is replaced with the given typeExpression. |
void |
JSDocInfoBuilder.mergePropertyBitfieldFrom(JSDocInfo other) |
Node |
Node.setJSDocInfo(JSDocInfo info)
Sets the
JSDocInfo attached to this node. |
Modifier and Type | Method and Description |
---|---|
JSDocInfo |
ProxyObjectType.getJSDocInfo() |
JSDocInfo |
ObjectType.getJSDocInfo()
Gets the docInfo for this type.
|
JSDocInfo |
Property.getJSDocInfo() |
JSDocInfo |
JSType.getJSDocInfo()
Gets the docInfo for this type.
|
JSDocInfo |
SimpleSlot.getJSDocInfo() |
JSDocInfo |
ObjectType.getOwnPropertyJSDocInfo(java.lang.String propertyName)
Gets the docInfo on the specified property on this type.
|
JSDocInfo |
ObjectType.getPropertyJSDocInfo(java.lang.String propertyName) |
Modifier and Type | Method and Description |
---|---|
ObjectType |
JSTypeRegistry.createAnonymousObjectType(JSDocInfo info)
Create an anonymous object type.
|
void |
ProxyObjectType.setJSDocInfo(JSDocInfo info) |
void |
ObjectType.setJSDocInfo(JSDocInfo info)
Sets the docInfo for this type from the given
JSDocInfo . |
void |
NoObjectType.setPropertyJSDocInfo(java.lang.String propertyName,
JSDocInfo info) |
void |
ProxyObjectType.setPropertyJSDocInfo(java.lang.String propertyName,
JSDocInfo info) |
void |
ObjectType.setPropertyJSDocInfo(java.lang.String propertyName,
JSDocInfo info)
Sets the docInfo for the specified property from the
JSDocInfo on its definition. |
void |
PrototypeObjectType.setPropertyJSDocInfo(java.lang.String propertyName,
JSDocInfo info) |
Copyright © 2009-2020 Google. All Rights Reserved.