Package | Description |
---|---|
com.google.javascript.jscomp |
Provides the core compiler and its public API.
|
com.google.javascript.rhino.jstype |
Provides abstractions to represent types in JavaScript.
|
com.google.javascript.rhino.testing |
Modifier and Type | Method and Description |
---|---|
FunctionType |
SymbolTable.Symbol.getFunctionType() |
Modifier and Type | Method and Description |
---|---|
void |
CodingConvention.applyDelegateRelationship(ObjectType delegateSuperclass,
ObjectType delegateBase,
ObjectType delegator,
FunctionType 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(ObjectType delegateSuperclass,
ObjectType delegateBase,
ObjectType delegator,
FunctionType delegateProxy,
FunctionType findDelegate) |
void |
CodingConvention.applySingletonGetter(FunctionType functionType,
FunctionType getterType,
ObjectType objectType)
In many JS libraries, the function that adds a singleton getter to a class
adds properties to the class.
|
void |
CodingConventions.Proxy.applySingletonGetter(FunctionType functionType,
FunctionType getterType,
ObjectType objectType) |
void |
ClosureCodingConvention.applySingletonGetter(FunctionType functionType,
FunctionType getterType,
ObjectType objectType) |
void |
CodingConvention.applySubclassRelationship(FunctionType parentCtor,
FunctionType childCtor,
CodingConvention.SubclassType type)
In many JS libraries, the function that produces inheritance also
adds properties to the superclass and/or subclass.
|
void |
CodingConventions.Proxy.applySubclassRelationship(FunctionType parentCtor,
FunctionType childCtor,
CodingConvention.SubclassType type) |
void |
ClosureCodingConvention.applySubclassRelationship(FunctionType parentCtor,
FunctionType childCtor,
CodingConvention.SubclassType type)
Closure's goog.inherits adds a
superClass_ property to the
subclass, and a constructor property. |
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 | Class and Description |
---|---|
class |
NoObjectType
The bottom Object type, representing the subclass of all objects.
|
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 |
FunctionType.cloneWithoutArrowType()
Create a new constructor with the parameters and return type stripped.
|
FunctionType |
JSTypeRegistry.createConstructorType(JSType returnType,
boolean lastVarArgs,
JSType... parameterTypes)
Creates a function type which can act as a constructor.
|
FunctionType |
JSTypeRegistry.createConstructorType(JSType returnType,
JSType... parameterTypes)
Creates a function type which can act as a constructor.
|
FunctionType |
JSTypeRegistry.createConstructorType(String name,
Node source,
Node parameters,
JSType returnType,
com.google.common.collect.ImmutableList<TemplateType> templateKeys)
Creates a constructor function type.
|
FunctionType |
JSTypeRegistry.createFunctionType(JSType returnType,
boolean lastVarArgs,
JSType... parameterTypes)
Creates a function type.
|
FunctionType |
JSTypeRegistry.createFunctionType(JSType returnType,
JSType... parameterTypes)
Creates a function type.
|
FunctionType |
JSTypeRegistry.createFunctionType(JSType returnType,
List<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.createFunctionTypeWithNewThisType(FunctionType existingFunctionType,
ObjectType thisType)
Creates a new function type based on an existing function type but
with a new
this type. |
FunctionType |
JSTypeRegistry.createFunctionTypeWithVarArgs(JSType returnType,
JSType... parameterTypes)
Creates a function type.
|
FunctionType |
JSTypeRegistry.createFunctionTypeWithVarArgs(JSType returnType,
List<JSType> parameterTypes)
Creates a function type.
|
FunctionType |
JSTypeRegistry.createInterfaceType(String name,
Node source,
com.google.common.collect.ImmutableList<TemplateType> templateKeys)
Creates an interface function type.
|
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 |
NoObjectType.getConstructor() |
FunctionType |
EnumElementType.getConstructor() |
FunctionType |
ProxyObjectType.getConstructor() |
FunctionType |
EnumType.getConstructor() |
FunctionType |
UnknownType.getConstructor() |
FunctionType |
JSTypeRegistry.getNativeFunctionType(JSTypeNative typeId) |
FunctionType |
ObjectType.getOwnerFunction()
Gets the owner of this if it's a function prototype.
|
FunctionType |
ProxyObjectType.getOwnerFunction() |
FunctionType |
FunctionType.getSuperClassConstructor()
Given a constructor or an interface type, get its superclass constructor
or
null if none exists. |
FunctionType |
NoObjectType.toMaybeFunctionType() |
FunctionType |
ProxyObjectType.toMaybeFunctionType() |
FunctionType |
JSType.toMaybeFunctionType()
Downcasts this to a FunctionType, or returns null if this is not
a function.
|
FunctionType |
FunctionType.toMaybeFunctionType() |
static FunctionType |
JSType.toMaybeFunctionType(JSType type)
Null-safe version of toMaybeFunctionType().
|
Modifier and Type | Method and Description |
---|---|
Collection<FunctionType> |
JSTypeRegistry.getDirectImplementors(ObjectType interfaceInstance)
Returns a collection of types that directly implement
interfaceInstance . |
List<FunctionType> |
FunctionType.getSubTypes()
Returns a list of types that are subtypes of this type.
|
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.
|
FunctionType |
JSTypeRegistry.createFunctionTypeWithNewThisType(FunctionType existingFunctionType,
ObjectType thisType)
Creates a new function type based on an existing function type but
with a new
this type. |
boolean |
FunctionType.hasEqualCallType(FunctionType otherType) |
Modifier and Type | Field and Description |
---|---|
protected FunctionType |
BaseJSTypeTestCase.ARRAY_FUNCTION_TYPE |
protected FunctionType |
BaseJSTypeTestCase.FUNCTION_FUNCTION_TYPE |
protected FunctionType |
BaseJSTypeTestCase.FUNCTION_INSTANCE_TYPE |
protected FunctionType |
BaseJSTypeTestCase.OBJECT_FUNCTION_TYPE |
protected FunctionType |
BaseJSTypeTestCase.U2U_CONSTRUCTOR_TYPE |
protected FunctionType |
BaseJSTypeTestCase.U2U_FUNCTION_TYPE |
Copyright © 2009–2015 Google. All rights reserved.