| Package | Description |
|---|---|
| com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
| 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 |
|---|---|
FunctionType |
SymbolTable.Symbol.getFunctionType() |
| Modifier and Type | Method and Description |
|---|---|
void |
CodingConvention.applyDelegateRelationship(NominalTypeBuilder delegateSuperclass,
NominalTypeBuilder delegateBase,
NominalTypeBuilder delegator,
ObjectType delegateProxy,
FunctionType findDelegate)
In many JS libraries, the function that creates a delegate relationship
also adds properties to the delegator and delegate base.
|
void |
CodingConventions.Proxy.applyDelegateRelationship(NominalTypeBuilder delegateSuperclass,
NominalTypeBuilder delegateBase,
NominalTypeBuilder delegator,
ObjectType delegateProxy,
FunctionType findDelegate) |
void |
CodingConvention.applySingletonGetter(NominalTypeBuilder classType,
FunctionType getterType)
In many JS libraries, the function that adds a singleton getter to a class
adds properties to the class.
|
void |
CodingConventions.Proxy.applySingletonGetter(NominalTypeBuilder classType,
FunctionType getterType) |
void |
ClosureCodingConvention.applySingletonGetter(NominalTypeBuilder classType,
FunctionType getterType) |
void |
ChromeCodingConvention.applySingletonGetter(NominalTypeBuilder classType,
FunctionType getterType) |
SymbolTable.Symbol |
SymbolTable.getSymbolDeclaredBy(FunctionType fn)
Gets the symbol for the given constructor or interface.
|
SymbolTable.Symbol |
SymbolTable.getSymbolForInstancesOf(FunctionType fn)
Gets the symbol for the prototype of the given constructor or interface.
|
| Modifier and Type | Method and Description |
|---|---|
FunctionType |
NominalTypeBuilder.constructor()
Returns the constructor as a JSType.
|
| Modifier and Type | Class and Description |
|---|---|
class |
NoObjectType
The bottom Object type, representing the subclass of all objects.
|
class |
NoResolvedType
An unresolved type that was forward declared.
|
class |
NoType
Bottom type, representing the subclass of any value or object.
|
| Modifier and Type | Method and Description |
|---|---|
FunctionType |
FunctionBuilder.build()
Construct a new function type.
|
FunctionType |
NominalTypeBuilderOti.constructor() |
FunctionType |
JSTypeRegistry.createConstructorType(java.lang.String name,
Node source,
Node parameters,
JSType returnType,
com.google.common.collect.ImmutableList<TemplateType> templateKeys,
boolean isAbstract)
Creates a constructor function type.
|
FunctionType |
JSTypeRegistry.createFunctionType(JSType returnType,
JSType... parameterTypes)
Creates a function type.
|
FunctionType |
JSTypeRegistry.createFunctionType(JSType returnType,
Node parameters) |
FunctionType |
JSTypeRegistry.createFunctionTypeWithNewReturnType(FunctionType existingFunctionType,
JSType returnType)
Creates a new function type based on an existing function type but
with a new return type.
|
FunctionType |
JSTypeRegistry.createFunctionTypeWithVarArgs(JSType returnType,
JSType... parameterTypes)
Creates a function type.
|
FunctionType |
JSTypeRegistry.createInterfaceType(java.lang.String name,
Node source,
com.google.common.collect.ImmutableList<TemplateType> templateKeys,
boolean struct)
Creates an interface function type.
|
FunctionType |
FunctionType.forgetParameterAndReturnTypes()
Create a new constructor with the parameters and return type stripped.
|
FunctionType |
FunctionType.getBindReturnType(int argsToBind)
Get the return value of calling "bind" on this function with the specified number of arguments.
|
abstract FunctionType |
ObjectType.getConstructor()
Gets this object's constructor.
|
FunctionType |
PrototypeObjectType.getConstructor() |
FunctionType |
UnknownType.getConstructor() |
FunctionType |
NoObjectType.getConstructor() |
FunctionType |
ProxyObjectType.getConstructor() |
FunctionType |
EnumType.getConstructor() |
FunctionType |
EnumElementType.getConstructor() |
FunctionType |
JSTypeRegistry.getNativeFunctionType(JSTypeNative typeId) |
FunctionType |
ObjectType.getOwnerFunction() |
FunctionType |
PrototypeObjectType.getOwnerFunction() |
FunctionType |
ProxyObjectType.getOwnerFunction() |
FunctionType |
ObjectType.getSuperClassConstructor() |
FunctionType |
FunctionType.getSuperClassConstructor()
Given a constructor or an interface type, get its superclass constructor or
null if
none exists. |
FunctionType |
JSType.toMaybeFunctionType()
Downcasts this to a FunctionType, or returns null if this is not a function.
|
FunctionType |
NoObjectType.toMaybeFunctionType() |
FunctionType |
ProxyObjectType.toMaybeFunctionType() |
FunctionType |
FunctionType.toMaybeFunctionType() |
static FunctionType |
JSType.toMaybeFunctionType(JSType type)
Null-safe version of toMaybeFunctionType().
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<FunctionType> |
FunctionType.checkExtendsLoop()
check if there is a loop in the type extends chain
|
java.util.Collection<FunctionType> |
JSTypeRegistry.getDirectImplementors(ObjectType interfaceInstance)
Returns a collection of types that directly implement
interfaceInstance. |
java.lang.Iterable<FunctionType> |
FunctionType.getDirectSubTypes() |
| Modifier and Type | Method and Description |
|---|---|
T |
Visitor.caseFunctionType(FunctionType type)
Function type's case.
|
JSType |
ModificationVisitor.caseFunctionType(FunctionType type) |
FunctionBuilder |
FunctionBuilder.copyFromOtherFunction(FunctionType otherType)
Copies all the information from another function type.
|
FunctionType |
JSTypeRegistry.createFunctionTypeWithNewReturnType(FunctionType existingFunctionType,
JSType returnType)
Creates a new function type based on an existing function type but
with a new return type.
|
boolean |
FunctionType.explicitlyImplOrExtInterface(FunctionType interfaceType)
check whether or not this function type has implemented the given interface if this function is
an interface, check whether or not this interface has extended the given interface
|
boolean |
FunctionType.hasEqualCallType(FunctionType otherType) |
| Constructor and Description |
|---|
NominalTypeBuilderOti(FunctionType constructor,
ObjectType instance) |
Copyright © 2009-2018 Google. All Rights Reserved.