| 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 |
ClosureCodingConvention.applySingletonGetter(NominalTypeBuilder classType,
FunctionType getterType) |
void |
CodingConventions.Proxy.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.
|
| Constructor and Description |
|---|
NominalTypeBuilder(FunctionType constructor,
ObjectType instance) |
| 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 |
JSType.assertFunctionType()
Returns this object cast to FunctionType or throws an exception if it isn't a FunctionType.
|
FunctionType |
FunctionType.Builder.build()
Constructs a new function type.
|
FunctionType |
FunctionType.Builder.buildAndResolve() |
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.
|
FunctionType |
NoObjectType.getConstructor() |
FunctionType |
UnknownType.getConstructor() |
FunctionType |
PrototypeObjectType.getConstructor() |
abstract FunctionType |
ObjectType.getConstructor()
Gets this object's constructor.
|
FunctionType |
EnumElementType.getConstructor() |
FunctionType |
FunctionType.getConstructor() |
FunctionType |
EnumType.getConstructor() |
FunctionType |
ProxyObjectType.getConstructor() |
FunctionType |
JSTypeRegistry.getNativeFunctionType(JSTypeNative typeId) |
FunctionType |
PrototypeObjectType.getOwnerFunction() |
FunctionType |
ObjectType.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 |
NoObjectType.toMaybeFunctionType() |
FunctionType |
FunctionType.toMaybeFunctionType() |
FunctionType |
JSType.toMaybeFunctionType()
Downcasts this to a FunctionType, or returns null if this is not a function.
|
FunctionType |
ProxyObjectType.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.
|
T |
Visitor.WithDefaultCase.caseFunctionType(FunctionType type) |
JSType |
TemplateTypeReplacer.caseFunctionType(FunctionType type) |
FunctionType.Builder |
FunctionType.Builder.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.hasEqualCallType(FunctionType that) |
Copyright © 2009-2020 Google. All Rights Reserved.