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 |
ClosureCodingConvention.applySingletonGetterOld(FunctionType functionType,
FunctionType getterType,
ObjectType objectType) |
void |
CodingConvention.applySingletonGetterOld(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.applySingletonGetterOld(FunctionType functionType,
FunctionType getterType,
ObjectType objectType) |
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. |
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) |
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 |
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,
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(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.
|
FunctionType |
UnknownType.getConstructor() |
FunctionType |
EnumElementType.getConstructor() |
FunctionType |
PrototypeObjectType.getConstructor() |
abstract FunctionType |
ObjectType.getConstructor()
Gets this object's constructor.
|
FunctionType |
ProxyObjectType.getConstructor() |
FunctionType |
NoObjectType.getConstructor() |
FunctionType |
EnumType.getConstructor() |
FunctionType |
JSTypeRegistry.getNativeFunctionType(JSTypeNative typeId) |
FunctionType |
PrototypeObjectType.getOwnerFunction() |
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 |
ProxyObjectType.toMaybeFunctionType() |
FunctionType |
NoObjectType.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 |
---|---|
List<FunctionType> |
FunctionType.checkExtendsLoop()
check if there is a loop in the type extends chain
|
List<FunctionType> |
FunctionType.checkExtendsLoop(HashSet<FunctionType> cache,
List<FunctionType> path) |
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 |
---|---|
JSType |
ModificationVisitor.caseFunctionType(FunctionType type) |
T |
Visitor.caseFunctionType(FunctionType type)
Function type's case.
|
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) |
protected boolean |
FunctionType.treatThisTypesAsCovariant(FunctionType other,
com.google.javascript.rhino.jstype.JSType.ImplCache implicitImplCache) |
Modifier and Type | Method and Description |
---|---|
List<FunctionType> |
FunctionType.checkExtendsLoop(HashSet<FunctionType> cache,
List<FunctionType> path) |
List<FunctionType> |
FunctionType.checkExtendsLoop(HashSet<FunctionType> cache,
List<FunctionType> path) |
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–2023 Google. All rights reserved.