public final class RawNominalType extends Namespace
duringComputeJSType, enums, name, namespaces, namespaceType, nominals, otherProps, scopes, typedefs| 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 non-optional declared prototype property to this class
|
boolean |
addSuperClass(NominalType superClass) |
void |
addUndeclaredClassProperty(String pname,
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(JSTypes commonTypes) |
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() |
NominalType |
getSuperClass() |
boolean |
hasCtorProp(String pname) |
boolean |
isClass() |
boolean |
isDict() |
boolean |
isFinalized() |
boolean |
isInterface() |
boolean |
isStruct() |
static RawNominalType |
makeDictClass(Node defSite,
QualifiedName name,
com.google.common.collect.ImmutableList<String> typeParameters) |
static RawNominalType |
makeInterface(Node defSite,
QualifiedName name,
com.google.common.collect.ImmutableList<String> typeParameters) |
static RawNominalType |
makeStructClass(Node defSite,
QualifiedName name,
com.google.common.collect.ImmutableList<String> typeParameters) |
static RawNominalType |
makeUnrestrictedClass(Node defSite,
QualifiedName name,
com.google.common.collect.ImmutableList<String> typeParameters) |
boolean |
mayHaveOwnProp(String pname) |
boolean |
mayHaveProp(String pname) |
void |
setCtorFunction(FunctionType ctorFn,
JSTypes commonTypes) |
String |
toString() |
addEnum, addNominalType, addProperty, addScope, addSubnamespace, addTypedef, addUndeclaredProperty, copyWindowProperties, getDeclaration, getName, getPropDeclaredType, getSubnamespace, hasProp, hasSubnamespace, isDefined, toJSType, withNamedTypespublic static RawNominalType makeUnrestrictedClass(Node defSite, QualifiedName name, com.google.common.collect.ImmutableList<String> typeParameters)
public static RawNominalType makeStructClass(Node defSite, QualifiedName name, com.google.common.collect.ImmutableList<String> typeParameters)
public static RawNominalType makeDictClass(Node defSite, QualifiedName name, com.google.common.collect.ImmutableList<String> typeParameters)
public static RawNominalType makeInterface(Node defSite, QualifiedName 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, JSTypes commonTypes)
public boolean addSuperClass(NominalType superClass)
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, 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(JSTypes commonTypes)
computeJSType in class Namespacepublic NominalType getAsNominalType()
public JSType getInstanceAsJSType()
public JSType getInstanceWithNullability(boolean includeNull)
Copyright © 2009-2016 Google. All Rights Reserved.