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 |
---|---|
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) |
Modifier and Type | Method and Description |
---|---|
void |
CodingConvention.defineDelegateProxyPrototypeProperties(JSTypeRegistry registry,
StaticTypedScope<JSType> scope,
List<ObjectType> delegateProxyPrototypes,
Map<String,String> delegateCallingConventions)
Defines the delegate proxy prototype properties.
|
void |
CodingConventions.Proxy.defineDelegateProxyPrototypeProperties(JSTypeRegistry registry,
StaticTypedScope<JSType> scope,
List<ObjectType> delegateProxyPrototypes,
Map<String,String> delegateCallingConventions) |
Modifier and Type | Class and Description |
---|---|
class |
EnumElementType
The type of individual elements of an enum type
(see
EnumType ). |
class |
EnumType
An enum type representing a branded collection of elements.
|
class |
FunctionType
This derived type provides extended information about a function, including
its return type and argument types.
|
class |
NamedType
A
NamedType is a named reference to some other type. |
class |
NoObjectType
The bottom Object type, representing the subclass of all objects.
|
class |
NoType
Bottom type, representing the subclass of any value or object.
|
class |
PrototypeObjectType
The object type represents instances of JavaScript objects such as
Object , Date , Function . |
class |
ProxyObjectType
An object type which uses composition to delegate all calls.
|
class |
RecordType
A record (structural) type.
|
class |
TemplateType |
class |
TemplatizedType
An object type with declared template types, such as
Array<string> . |
class |
UnknownType
The
Unknown type. |
Modifier and Type | Method and Description |
---|---|
static ObjectType |
ObjectType.cast(JSType type)
A null-safe version of JSType#toObjectType.
|
ObjectType |
JSTypeRegistry.createAnonymousObjectType(JSDocInfo info)
Create an anonymous object type.
|
ObjectType |
JSTypeRegistry.createObjectType(String name,
ObjectType implicitPrototype)
Create an object type.
|
ObjectType |
JSType.dereference()
Dereference a type for property access.
|
ObjectType |
UnknownType.getImplicitPrototype() |
ObjectType |
EnumElementType.getImplicitPrototype() |
ObjectType |
PrototypeObjectType.getImplicitPrototype() |
abstract ObjectType |
ObjectType.getImplicitPrototype()
Gets the implicit prototype (a.k.a.
|
ObjectType |
ProxyObjectType.getImplicitPrototype() |
ObjectType |
NoObjectType.getImplicitPrototype() |
ObjectType |
EnumType.getImplicitPrototype() |
ObjectType |
RecordType.getImplicitPrototype() |
ObjectType |
FunctionType.getInstanceType()
Gets the type of instance of this function.
|
ObjectType |
JSTypeRegistry.getNativeObjectType(JSTypeNative typeId) |
ObjectType |
ObjectType.getParentScope() |
ObjectType |
FunctionType.getPrototype()
Gets the
prototype property of this function type. |
ObjectType |
TemplatizedType.getReferencedType() |
static ObjectType |
FunctionType.getTopDefiningInterface(ObjectType type,
String propertyName)
Given an interface and a property, finds the top-most super interface
that has the property defined (including this interface).
|
ObjectType |
FunctionType.getTopMostDefiningType(String propertyName)
Given a constructor or an interface type and a property, finds the
top-most superclass that has the property defined (including this
constructor).
|
ObjectType |
JSType.toMaybeObjectType() |
ObjectType |
JSType.toObjectType()
Casts this to an ObjectType, or returns null if this is not an ObjectType.
|
Modifier and Type | Method and Description |
---|---|
Iterable<ObjectType> |
FunctionType.getAllImplementedInterfaces()
Returns all interfaces implemented by a class or its superclass and any
superclasses for any of those interfaces.
|
Iterable<ObjectType> |
PrototypeObjectType.getCtorExtendedInterfaces() |
Iterable<ObjectType> |
ObjectType.getCtorExtendedInterfaces()
Gets the interfaces extended by the interface associated with this type.
|
Iterable<ObjectType> |
PrototypeObjectType.getCtorImplementedInterfaces() |
Iterable<ObjectType> |
ObjectType.getCtorImplementedInterfaces()
Gets the interfaces implemented by the ctor associated with this type.
|
Iterable<ObjectType> |
ProxyObjectType.getCtorImplementedInterfaces() |
Iterable<ObjectType> |
JSTypeRegistry.getEachReferenceTypeWithProperty(String propertyName)
Returns each reference type that has a property
propertyName
defined on it. |
Iterable<ObjectType> |
FunctionType.getExtendedInterfaces()
Returns interfaces directly extended by an interface
|
Iterable<ObjectType> |
FunctionType.getImplementedInterfaces()
Returns interfaces implemented directly by a class or its superclass.
|
Iterable<ObjectType> |
FunctionType.getOwnImplementedInterfaces()
Returns interfaces directly implemented by the class.
|
Modifier and Type | Method and Description |
---|---|
JSType |
ModificationVisitor.caseObjectType(ObjectType objType) |
T |
Visitor.caseObjectType(ObjectType type)
Object type's case.
|
JSType |
JSTypeRegistry.createFunctionTypeWithInstanceType(ObjectType instanceType,
JSType returnType,
List<JSType> parameterTypes)
Creates a function type in which
this refers to an object instance. |
ObjectType |
JSTypeRegistry.createObjectType(String name,
ObjectType implicitPrototype)
Create an object type.
|
TemplatizedType |
JSTypeRegistry.createTemplatizedType(ObjectType baseType,
com.google.common.collect.ImmutableList<JSType> templatizedTypes)
Creates a templatized instance of the specified type.
|
TemplatizedType |
JSTypeRegistry.createTemplatizedType(ObjectType baseType,
JSType... templatizedTypes)
Creates a templatized instance of the specified type.
|
TemplatizedType |
JSTypeRegistry.createTemplatizedType(ObjectType baseType,
Map<TemplateType,JSType> templatizedTypes)
Creates a templatized instance of the specified type.
|
void |
FunctionType.extendTemplateTypeMapBasedOn(ObjectType type)
Extends the TemplateTypeMap of the function's this type, based on the
specified type.
|
Collection<FunctionType> |
JSTypeRegistry.getDirectImplementors(ObjectType interfaceInstance)
Returns a collection of types that directly implement
interfaceInstance . |
static ObjectType |
FunctionType.getTopDefiningInterface(ObjectType type,
String propertyName)
Given an interface and a property, finds the top-most super interface
that has the property defined (including this interface).
|
void |
PrototypeObjectType.matchRecordTypeConstraint(ObjectType constraintObj) |
boolean |
JSTypeRegistry.resetImplicitPrototype(JSType type,
ObjectType newImplicitProto)
Set the implicit prototype if it's possible to do so.
|
void |
FunctionType.setPrototypeBasedOn(ObjectType baseType)
Sets the prototype, creating the prototype object from the given
base type.
|
Modifier and Type | Method and Description |
---|---|
void |
FunctionType.setExtendedInterfaces(List<ObjectType> extendedInterfaces) |
void |
FunctionType.setImplementedInterfaces(List<ObjectType> implementedInterfaces) |
Modifier and Type | Field and Description |
---|---|
protected ObjectType |
BaseJSTypeTestCase.ARRAY_TYPE |
protected ObjectType |
BaseJSTypeTestCase.BOOLEAN_OBJECT_TYPE |
protected ObjectType |
BaseJSTypeTestCase.CHECKED_UNKNOWN_TYPE |
protected ObjectType |
BaseJSTypeTestCase.DATE_TYPE |
protected ObjectType |
BaseJSTypeTestCase.ERROR_TYPE |
protected ObjectType |
BaseJSTypeTestCase.EVAL_ERROR_TYPE |
protected ObjectType |
BaseJSTypeTestCase.FUNCTION_PROTOTYPE |
protected ObjectType |
BaseJSTypeTestCase.NO_OBJECT_TYPE |
protected ObjectType |
BaseJSTypeTestCase.NO_RESOLVED_TYPE |
protected ObjectType |
BaseJSTypeTestCase.NO_TYPE |
protected ObjectType |
BaseJSTypeTestCase.NUMBER_OBJECT_TYPE |
protected ObjectType |
BaseJSTypeTestCase.OBJECT_TYPE |
protected ObjectType |
BaseJSTypeTestCase.RANGE_ERROR_TYPE |
protected ObjectType |
BaseJSTypeTestCase.REFERENCE_ERROR_TYPE |
protected ObjectType |
BaseJSTypeTestCase.REGEXP_TYPE |
protected ObjectType |
BaseJSTypeTestCase.STRING_OBJECT_TYPE |
protected ObjectType |
BaseJSTypeTestCase.SYNTAX_ERROR_TYPE |
protected ObjectType |
BaseJSTypeTestCase.TYPE_ERROR_TYPE |
protected ObjectType |
BaseJSTypeTestCase.UNKNOWN_TYPE |
protected ObjectType |
BaseJSTypeTestCase.URI_ERROR_TYPE |
Modifier and Type | Method and Description |
---|---|
protected TemplatizedType |
BaseJSTypeTestCase.createTemplatizedType(ObjectType baseType,
com.google.common.collect.ImmutableList<JSType> templatizedTypes) |
protected TemplatizedType |
BaseJSTypeTestCase.createTemplatizedType(ObjectType baseType,
JSType... templatizedType) |
Copyright © 2009–2023 Google. All rights reserved.