Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.jscomp.lint | |
com.google.javascript.jscomp.newtypes | |
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.testing |
Modifier and Type | Method and Description |
---|---|
private JSTypeExpression |
Es6TypedToEs6Converter.createIObject(Node indexSignature) |
private JSTypeExpression |
Es6ToEs3Converter.getTypeFromGetterOrSetter(Node node) |
(package private) static JSTypeExpression |
PolymerPassStaticUtils.getTypeFromProperty(PolymerPass.MemberDefinition property,
AbstractCompiler compiler)
Gets the JSTypeExpression for a given property using its "type" key.
|
Modifier and Type | Method and Description |
---|---|
private void |
TypeCheck.checkTypeContainsObjectWithBadKey(NodeTraversal t,
Node n,
JSTypeExpression type) |
static Node.TypeDeclarationNode |
JsdocToEs6TypedConverter.TypeDeclarationsIRFactory.convert(JSTypeExpression typeExpr) |
private boolean |
ProcessDefines.isValidDefineType(JSTypeExpression expression)
Only defines of literal number, string, or boolean are supported.
|
private void |
CheckRequiresForConstructors.maybeAddUsage(NodeTraversal t,
Node n,
JSTypeExpression expr)
Adds a usage for the given type expression (unless it references a variable that is
defined in the externs, in which case no goog.require() is needed).
|
private void |
JsdocToEs6TypedConverter.setTypeExpression(Node n,
JSTypeExpression type) |
Modifier and Type | Method and Description |
---|---|
private boolean |
CheckJSDocStyle.checkParam(NodeTraversal t,
Node param,
java.lang.String name,
JSTypeExpression paramType)
Checks that the given parameter node has the given name, and that the given type is
compatible.
|
Modifier and Type | Field and Description |
---|---|
private JSTypeExpression |
EnumType.typeExpr |
private JSTypeExpression |
Typedef.typeExpr |
Modifier and Type | Method and Description |
---|---|
JSTypeExpression |
EnumType.getTypeExpr() |
JSTypeExpression |
Typedef.getTypeExpr() |
JSTypeExpression |
EnumType.getTypeExprForErrorReporting() |
JSTypeExpression |
Typedef.getTypeExprForErrorReporting() |
Modifier and Type | Method and Description |
---|---|
private JSType |
JSTypeCreatorFromJSDoc.getTypeFromJSTypeExpression(JSTypeExpression expr,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
static Typedef |
Typedef.make(JSTypeExpression typeExpr) |
static EnumType |
EnumType.make(java.lang.String name,
JSTypeExpression typeExpr,
java.util.Collection<java.lang.String> props) |
private JSTypeCreatorFromJSDoc.ParameterType |
JSTypeCreatorFromJSDoc.parseParameter(JSTypeExpression jsdoc,
JSTypeCreatorFromJSDoc.ParameterKind p,
DeclaredTypeRegistry registry,
com.google.common.collect.ImmutableList<java.lang.String> typeParameters) |
Constructor and Description |
---|
EnumType(java.lang.String name,
JSTypeExpression typeExpr,
java.util.Collection<java.lang.String> props) |
Typedef(JSTypeExpression typeExpr) |
Modifier and Type | Field and Description |
---|---|
(package private) JSTypeExpression |
JsDocInfoParser.ExtendedTypeInfo.type |
Modifier and Type | Method and Description |
---|---|
(package private) JSTypeExpression |
JsDocInfoParser.createJSTypeExpression(Node n)
Constructs a new
JSTypeExpression . |
Constructor and Description |
---|
ExtendedTypeInfo(JSTypeExpression type,
int lineno,
int charno) |
Modifier and Type | Field and Description |
---|---|
private JSTypeExpression |
JSDocInfo.LazilyInitializedInfo.baseType |
private JSTypeExpression |
JSDocInfo.thisType
The type for
JSDocInfo.getThisType() . |
private JSTypeExpression |
JSDocInfo.type
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<JSTypeExpression> |
JSDocInfo.LazilyInitializedInfo.extendedInterfaces |
private java.util.List<JSTypeExpression> |
JSDocInfo.LazilyInitializedInfo.implementedInterfaces |
private java.util.Map<java.lang.String,JSTypeExpression> |
JSDocInfo.LazilyInitializedInfo.parameters |
private java.util.List<JSTypeExpression> |
JSDocInfo.LazilyInitializedInfo.thrownTypes |
private java.util.Map<JSTypeExpression,java.lang.String> |
JSDocInfo.LazilyInitializedDocumentation.throwsDescriptions |
Modifier and Type | Method and Description |
---|---|
JSTypeExpression |
JSTypeExpression.clone() |
JSTypeExpression |
JSDocInfo.getBaseType()
Gets the base type specified by the
@extends annotation. |
JSTypeExpression |
JSDocInfo.getEnumParameterType()
Gets the enum parameter type specified by the
@enum annotation. |
JSTypeExpression |
JSDocInfo.getParameterType(java.lang.String parameter)
Gets the type of a given named parameter.
|
JSTypeExpression |
JSDocInfo.getReturnType()
Gets the return type specified by the
@return annotation. |
JSTypeExpression |
JSDocInfo.getThisType()
Gets the type specified by the
@this annotation. |
JSTypeExpression |
JSDocInfo.getType()
Gets the type specified by the
@type annotation. |
private JSTypeExpression |
JSDocInfo.getType(int typefield) |
JSTypeExpression |
JSDocInfo.getTypedefType()
Gets the typedef type specified by the
@type annotation. |
static JSTypeExpression |
JSTypeExpression.makeOptionalArg(JSTypeExpression expr)
Make the given type expression into an optional type expression,
if possible.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<JSTypeExpression> |
JSDocInfo.getExtendedInterfaces()
Returns the interfaces extended by an interface
|
java.util.List<JSTypeExpression> |
JSDocInfo.getImplementedInterfaces()
Returns the types specified by the
@implements annotation. |
java.util.List<JSTypeExpression> |
JSDocInfo.getThrownTypes()
Returns the list of thrown types.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
JSDocInfo.addExtendedInterface(JSTypeExpression type)
Adds an extended interface (for interface only).
|
(package private) boolean |
JSDocInfo.addImplementedInterface(JSTypeExpression interfaceName)
Adds an implemented interface.
|
boolean |
JSDocInfoBuilder.changeBaseType(JSTypeExpression jsType)
Changes a base type, even if one has already been set on currentInfo.
|
(package private) boolean |
JSDocInfo.declareParam(JSTypeExpression jsType,
java.lang.String parameter)
Declares a parameter.
|
(package private) boolean |
JSDocInfo.declareThrows(JSTypeExpression jsType)
Declares that the method throws a given type.
|
(package private) boolean |
JSDocInfo.declareTypedefType(JSTypeExpression type) |
(package private) boolean |
JSDocInfo.documentThrows(JSTypeExpression type,
java.lang.String throwsDescription)
Documents the throws (i.e.
|
java.lang.String |
JSDocInfo.getThrowsDescriptionForType(JSTypeExpression type)
Get the message for a given thrown type.
|
static JSTypeExpression |
JSTypeExpression.makeOptionalArg(JSTypeExpression expr)
Make the given type expression into an optional type expression,
if possible.
|
boolean |
JSDocInfoBuilder.recordBaseType(JSTypeExpression jsType)
Records a base type.
|
boolean |
JSDocInfoBuilder.recordDefineType(JSTypeExpression type)
Records the type of a define.
|
boolean |
JSDocInfoBuilder.recordEnumParameterType(JSTypeExpression type)
Records a parameter type to an enum.
|
boolean |
JSDocInfoBuilder.recordExtendedInterface(JSTypeExpression interfaceType)
Records an extended interface type.
|
boolean |
JSDocInfoBuilder.recordImplementedInterface(JSTypeExpression interfaceName)
Records an implemented interface.
|
boolean |
JSDocInfoBuilder.recordParameter(java.lang.String parameterName,
JSTypeExpression type)
Records a typed parameter.
|
boolean |
JSDocInfoBuilder.recordReturnType(JSTypeExpression jsType)
Records a return type.
|
boolean |
JSDocInfoBuilder.recordThisType(JSTypeExpression type)
Records a type for
@this annotation. |
boolean |
JSDocInfoBuilder.recordThrowDescription(JSTypeExpression type,
java.lang.String description)
Records a throw type's description.
|
boolean |
JSDocInfoBuilder.recordThrowType(JSTypeExpression type)
Records a thrown type.
|
boolean |
JSDocInfoBuilder.recordType(JSTypeExpression type)
Records a type.
|
boolean |
JSDocInfoBuilder.recordTypedef(JSTypeExpression type)
Records that the
JSDocInfo being built should be populated
with a typedef 'd type. |
(package private) void |
JSDocInfo.setBaseType(JSTypeExpression type) |
(package private) void |
JSDocInfo.setEnumParameterType(JSTypeExpression type) |
(package private) void |
JSDocInfo.setReturnType(JSTypeExpression type) |
(package private) void |
JSDocInfo.setThisType(JSTypeExpression type)
Sets the type specified by the
@this annotation. |
(package private) void |
JSDocInfo.setType(JSTypeExpression type) |
private void |
JSDocInfo.setType(JSTypeExpression type,
int mask) |
Modifier and Type | Method and Description |
---|---|
protected void |
BaseJSTypeTestCase.assertTypeEquals(JSType expected,
JSTypeExpression actual)
Asserts that a a type expression resolves to the correct
JSType . |
protected JSType |
BaseJSTypeTestCase.resolve(JSTypeExpression n,
java.lang.String... warnings)
Resolves a type expression, expecting the given warnings.
|