public class NominalTypeBuilder
extends java.lang.Object
This builder is used during the first part of type checking, while the type checker builds up the set of known types. Thus, this interface serves as a placeholder to allow operating on (i.e. both assigning properties to, and referencing the yet-to-exist type) these not-yet-available types.
| Constructor and Description |
|---|
NominalTypeBuilder(FunctionType constructor,
ObjectType instance) |
| Modifier and Type | Method and Description |
|---|---|
FunctionType |
constructor()
Returns the constructor as a JSType.
|
void |
declareConstructorProperty(java.lang.String name,
JSType type,
Node defSite)
Declares a static property on the nominal type's constructor.
|
void |
declareInstanceProperty(java.lang.String name,
JSType type,
Node defSite)
Declares an instance property on the nominal type.
|
void |
declarePrototypeProperty(java.lang.String name,
JSType type,
Node defSite)
Declares a property on the nominal type's prototype.
|
ObjectType |
instance()
Returns the instance type as a JSType.
|
ObjectType |
prototypeOrInstance()
Returns the type of the prototype object (OTI).
|
NominalTypeBuilder |
superClass()
Returns a NominalTypeBuilder for this type's superclass.
|
public NominalTypeBuilder(FunctionType constructor, ObjectType instance)
public void declarePrototypeProperty(java.lang.String name,
JSType type,
Node defSite)
public void declareInstanceProperty(java.lang.String name,
JSType type,
Node defSite)
public void declareConstructorProperty(java.lang.String name,
JSType type,
Node defSite)
public NominalTypeBuilder superClass()
public FunctionType constructor()
public ObjectType instance()
public ObjectType prototypeOrInstance()
Copyright © 2009-2019 Google. All Rights Reserved.