public final class RawNominalType extends Namespace
commonTypes, 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)
Add a new undeclared property to this class's constructor
|
void |
addUndeclaredProtoProperty(String pname,
Node defSite)
Add a new undeclared prototype property to this class
|
protected JSType |
computeJSType() |
void |
finalize() |
Set<String> |
getAllOwnProps() |
NominalType |
getAsNominalType() |
FunctionType |
getConstructorFunction() |
JSType |
getCtorPropDeclaredType(String pname) |
Node |
getDefSite() |
JSType |
getInstanceAsJSType() |
JSType |
getInstancePropDeclaredType(String pname) |
JSType |
getInstanceWithNullability(boolean includeNull) |
com.google.common.collect.ImmutableSet<NominalType> |
getInterfaces() |
JSType |
getProtoPropDeclaredType(String pname) |
NominalType |
getSuperClass() |
boolean |
hasCtorProp(String pname) |
boolean |
inheritsFromIObject() |
boolean |
isClass() |
boolean |
isDict() |
boolean |
isFinalized() |
boolean |
isInterface() |
boolean |
isStruct() |
static RawNominalType |
makeDictClass(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters) |
static RawNominalType |
makeNominalInterface(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters) |
static RawNominalType |
makeStructClass(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters) |
static RawNominalType |
makeStructuralInterface(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters) |
static RawNominalType |
makeUnrestrictedClass(JSTypes commonTypes,
Node defSite,
String name,
com.google.common.collect.ImmutableList<String> typeParameters) |
boolean |
mayHaveOwnProp(String pname) |
boolean |
mayHaveProp(String pname) |
void |
setCtorFunction(FunctionType ctorFn) |
String |
toString() |
addNamespace, addProperty, addTypedef, addUndeclaredProperty, copyWindowProperties, getDeclaration, getName, getPropDeclaredType, getSubnamespace, hasProp, hasSubnamespace, isDefined, toJSTypepublic static RawNominalType makeUnrestrictedClass(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters)
public static RawNominalType makeStructClass(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters)
public static RawNominalType makeDictClass(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters)
public static RawNominalType makeNominalInterface(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters)
public static RawNominalType makeStructuralInterface(JSTypes commonTypes, Node defSite, String name, com.google.common.collect.ImmutableList<String> typeParameters)
public Node getDefSite()
public boolean isClass()
public boolean isInterface()
public boolean isStruct()
public boolean isDict()
public boolean isFinalized()
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 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)
public boolean hasCtorProp(String pname)
public void addCtorProperty(String pname, Node defSite, JSType type, boolean isConstant)
public void addUndeclaredCtorProperty(String pname, Node defSite)
protected JSType computeJSType()
computeJSType in class Namespacepublic NominalType getAsNominalType()
public JSType getInstanceAsJSType()
public JSType getInstanceWithNullability(boolean includeNull)
Copyright © 2009-2016 Google. All Rights Reserved.