public final class RawNominalType extends Namespace
commonTypes, defSite, name, namespaceType, otherProps| Modifier and Type | Method and Description |
|---|---|
void |
addClassProperty(String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to instances of this class
|
void |
addCtorProperty(String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new non-optional declared property to this class's constructor
|
boolean |
addInterfaces(com.google.common.collect.ImmutableSet<NominalType> interfaces) |
void |
addPropertyWhichMayNotBeOnAllInstances(String pname,
JSType type) |
void |
addProtoProperty(String pname,
Node defSite,
JSType type,
boolean isConstant)
Add a new declared prototype property to this class
|
boolean |
addSuperClass(NominalType superclass) |
void |
addUndeclaredClassProperty(String pname,
JSType type,
Node defSite)
Add a new undeclared property to instances of this class
|
void |
addUndeclaredCtorProperty(String pname,
Node defSite,
JSType inferredType)
Add a new undeclared property to this class's constructor
|
void |
addUndeclaredProtoProperty(String pname,
Node defSite,
JSType inferredType)
Add a new undeclared prototype property to this class
|
protected JSType |
computeJSType() |
void |
fixSubtypesAfterDeserialization() |
void |
freeze() |
Set<String> |
getAllOwnClassProps() |
Set<String> |
getAllOwnProps() |
NominalType |
getAsNominalType() |
FunctionType |
getConstructorFunction() |
JSType |
getCtorPropDeclaredType(String pname) |
JSType |
getInstanceAsJSType() |
JSType |
getInstancePropDeclaredType(String pname) |
JSType |
getInstanceWithNullability(boolean includeNull) |
com.google.common.collect.ImmutableSet<NominalType> |
getInterfaces() |
JSType |
getProtoPropDeclaredType(String pname) |
NominalType |
getSuperClass() |
boolean |
hasAbstractMethod(String pname) |
boolean |
hasCtorProp(String pname) |
boolean |
inheritsFromIObject() |
boolean |
isAbstractClass() |
boolean |
isBuiltinObject() |
boolean |
isClass() |
boolean |
isDict() |
boolean |
isFrozen() |
boolean |
isInterface() |
boolean |
isStruct() |
static RawNominalType |
makeClass(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters,
ObjectKind objKind,
boolean isAbstract) |
static RawNominalType |
makeNominalInterface(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters,
ObjectKind objKind) |
static RawNominalType |
makeStructuralInterface(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters,
ObjectKind objKind) |
boolean |
mayHaveOwnProp(String pname) |
boolean |
mayHaveProp(String pname) |
void |
refreezeAfterDeserialization() |
void |
setCtorFunction(FunctionType ctorFn) |
String |
toString() |
void |
unfreezeForDeserialization() |
addNamespace, addProperty, addTypedef, addUndeclaredProperty, copyWindowProperties, getDeclaration, getDefSite, getName, getPropDeclaredType, getSubnamespace, hasProp, hasSubnamespace, isDefined, toJSTypepublic static RawNominalType makeClass(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters, ObjectKind objKind, boolean isAbstract)
public static RawNominalType makeNominalInterface(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters, ObjectKind objKind)
public static RawNominalType makeStructuralInterface(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters, ObjectKind objKind)
public boolean isBuiltinObject()
public boolean isClass()
public boolean isInterface()
public boolean isStruct()
public boolean isDict()
public boolean isAbstractClass()
public boolean isFrozen()
public FunctionType getConstructorFunction()
public void setCtorFunction(FunctionType ctorFn)
public boolean addSuperClass(NominalType superclass)
public boolean inheritsFromIObject()
public boolean addInterfaces(com.google.common.collect.ImmutableSet<NominalType> interfaces)
public NominalType getSuperClass()
public com.google.common.collect.ImmutableSet<NominalType> getInterfaces()
public boolean hasAbstractMethod(String pname)
public boolean mayHaveOwnProp(String pname)
public boolean mayHaveProp(String pname)
public void addPropertyWhichMayNotBeOnAllInstances(String pname, JSType type)
public void addClassProperty(String pname, Node defSite, JSType type, boolean isConstant)
public void addUndeclaredClassProperty(String pname, JSType type, Node defSite)
public void addProtoProperty(String pname, Node defSite, JSType type, boolean isConstant)
public void addUndeclaredProtoProperty(String pname, Node defSite, JSType inferredType)
public boolean hasCtorProp(String pname)
public void addCtorProperty(String pname, Node defSite, JSType type, boolean isConstant)
public void addUndeclaredCtorProperty(String pname, Node defSite, JSType inferredType)
public void freeze()
protected JSType computeJSType()
computeJSType in class Namespacepublic NominalType getAsNominalType()
public JSType getInstanceAsJSType()
public JSType getInstanceWithNullability(boolean includeNull)
public void fixSubtypesAfterDeserialization()
public void unfreezeForDeserialization()
public void refreezeAfterDeserialization()
Copyright © 2009-2017 Google. All Rights Reserved.