| 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 |
|---|---|
void |
CodingConventions.Proxy.applyDelegateRelationship(NominalTypeBuilder delegateSuperclass,
NominalTypeBuilder delegateBase,
NominalTypeBuilder delegator,
ObjectType delegateProxy,
FunctionType findDelegate) |
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.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectType |
NominalTypeBuilder.instance()
Returns the instance type as a JSType.
|
ObjectType |
NominalTypeBuilder.prototypeOrInstance()
Returns the type of the prototype object (OTI).
|
| Constructor and Description |
|---|
NominalTypeBuilder(FunctionType constructor,
ObjectType instance) |
| 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 |
NoResolvedType
An unresolved type that was forward declared.
|
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
A placeholder type, used as keys in
TemplateTypeMaps. |
class |
TemplatizedType
An object type with declared template types, such as
Array<string>. |
class |
UnknownType
The
Unknown type. |
| Modifier and Type | Method and Description |
|---|---|
ObjectType |
JSType.assertObjectType()
Returns this object cast to ObjectType or throws an exception if it isn't an ObjectType.
|
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(java.lang.String name,
ObjectType implicitPrototype)
Create an object type.
|
ObjectType |
JSType.dereference()
Dereferences a type for property access.
|
ObjectType |
ObjectType.getClosestDefiningType(java.lang.String propertyName)
Returns the closest ancestor that defines the property including this type itself.
|
ObjectType |
NoObjectType.getImplicitPrototype() |
ObjectType |
ProxyObjectType.getImplicitPrototype() |
ObjectType |
EnumElementType.getImplicitPrototype() |
abstract ObjectType |
ObjectType.getImplicitPrototype()
Gets the implicit prototype (a.k.a.
|
ObjectType |
PrototypeObjectType.getImplicitPrototype() |
ObjectType |
EnumType.getImplicitPrototype() |
ObjectType |
UnknownType.getImplicitPrototype() |
ObjectType |
RecordType.getImplicitPrototype() |
ObjectType |
FunctionType.getInstanceType()
Gets the type of instance of this function.
|
ObjectType |
JSTypeRegistry.getNativeObjectType(JSTypeNative typeId) |
ObjectType |
Property.OwnedProperty.getOwner() |
ObjectType |
Property.OwnedProperty.getOwnerInstanceType() |
ObjectType |
FunctionType.getPrototype()
Gets the
prototype property of this function type. |
ObjectType |
FunctionType.getPrototypeProperty() |
ObjectType |
ObjectType.getRawType() |
ObjectType |
TemplatizedType.getReferencedType() |
ObjectType |
ObjectType.getTopMostDefiningType(java.lang.String propertyName)
Returns the top most type that defines the property.
|
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 |
|---|---|
java.lang.Iterable<ObjectType> |
FunctionType.getAllImplementedInterfaces()
Returns all interfaces implemented by a class or its superclass and any superclasses for any of
those interfaces.
|
java.util.Collection<ObjectType> |
FunctionType.getAncestorInterfaces() |
java.lang.Iterable<ObjectType> |
ProxyObjectType.getCtorExtendedInterfaces() |
java.lang.Iterable<ObjectType> |
ObjectType.getCtorExtendedInterfaces()
Gets the interfaces extended by the interface associated with this type.
|
java.lang.Iterable<ObjectType> |
PrototypeObjectType.getCtorExtendedInterfaces() |
java.lang.Iterable<ObjectType> |
TemplatizedType.getCtorExtendedInterfaces() |
java.lang.Iterable<ObjectType> |
ProxyObjectType.getCtorImplementedInterfaces() |
java.lang.Iterable<ObjectType> |
ObjectType.getCtorImplementedInterfaces()
Gets the interfaces implemented by the ctor associated with this type.
|
java.lang.Iterable<ObjectType> |
PrototypeObjectType.getCtorImplementedInterfaces() |
java.lang.Iterable<ObjectType> |
TemplatizedType.getCtorImplementedInterfaces() |
java.lang.Iterable<ObjectType> |
JSTypeRegistry.getEachReferenceTypeWithProperty(java.lang.String propertyName)
Returns each reference type that has a property
propertyName
defined on it. |
com.google.common.collect.ImmutableList<ObjectType> |
FunctionType.getExtendedInterfaces()
Returns interfaces directly extended by an interface
|
com.google.common.collect.ImmutableList<ObjectType> |
FunctionType.getImplementedInterfaces()
Returns interfaces implemented directly by a class or its superclass.
|
java.lang.Iterable<ObjectType> |
ObjectType.getImplicitPrototypeChain()
Returns a lazy, dynamic
Iterable for the types forming the implicit prototype chain of
this type. |
com.google.common.collect.ImmutableList<ObjectType> |
FunctionType.getOwnImplementedInterfaces()
Returns interfaces directly implemented by the class.
|
| Modifier and Type | Method and Description |
|---|---|
JSType |
JSTypeRegistry.buildRecordTypeFromObject(ObjectType objType) |
JSType |
TemplateTypeReplacer.caseObjectType(ObjectType objType) |
T |
Visitor.caseObjectType(ObjectType type)
Object type's case.
|
T |
Visitor.WithDefaultCase.caseObjectType(ObjectType type) |
JSType |
JSTypeRegistry.createFunctionTypeWithInstanceType(ObjectType instanceType,
JSType returnType,
java.util.List<JSType> parameterTypes)
Creates a function type in which
this refers to an object instance. |
ObjectType |
JSTypeRegistry.createObjectType(java.lang.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,
java.util.Map<TemplateType,JSType> templatizedTypes)
Creates a templatized instance of the specified type.
|
java.util.Collection<FunctionType> |
JSTypeRegistry.getDirectImplementors(ObjectType interfaceInstance)
Returns a collection of types that directly implement
interfaceInstance. |
void |
PrototypeObjectType.matchRecordTypeConstraint(ObjectType constraintObj) |
void |
JSType.mergeSupertypeTemplateTypes(ObjectType other)
Prepends the template type map associated with this type, merging in the keys and values of the
specified map.
|
void |
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.
|
FunctionType.Builder |
FunctionType.Builder.withPrototypeBasedOn(ObjectType setPrototypeBasedOn)
Set the prototype property of a constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
FunctionType.setExtendedInterfaces(java.util.List<ObjectType> extendedInterfaces) |
void |
FunctionType.setImplementedInterfaces(java.util.List<ObjectType> implementedInterfaces) |
| Constructor and Description |
|---|
OwnedProperty(ObjectType owner,
Property value) |
Copyright © 2009-2019 Google. All Rights Reserved.