public final class JSTypeExpression
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Node |
root
The root of the AST.
|
private static long |
serialVersionUID |
private java.lang.String |
sourceName
The source name where the type expression appears.
|
Constructor and Description |
---|
JSTypeExpression(Node root,
java.lang.String sourceName) |
Modifier and Type | Method and Description |
---|---|
JSTypeExpression |
clone() |
boolean |
equals(java.lang.Object other) |
JSType |
evaluate(StaticTypedScope<JSType> scope,
TypeIRegistry registry)
Evaluates the type expression into a
JSType object. |
TypeI |
evaluateInEmptyScope(TypeIRegistry registry) |
Node |
getRoot() |
int |
hashCode() |
boolean |
isOptionalArg() |
boolean |
isVarArgs() |
static JSTypeExpression |
makeOptionalArg(JSTypeExpression expr)
Make the given type expression into an optional type expression,
if possible.
|
java.lang.String |
toString() |
private static final long serialVersionUID
private final Node root
private final java.lang.String sourceName
public JSTypeExpression(Node root, java.lang.String sourceName)
public static JSTypeExpression makeOptionalArg(JSTypeExpression expr)
public boolean isOptionalArg()
@param
.public boolean isVarArgs()
@param
.public JSType evaluate(StaticTypedScope<JSType> scope, TypeIRegistry registry)
JSType
object.public TypeI evaluateInEmptyScope(TypeIRegistry registry)
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Node getRoot()
public java.lang.String toString()
toString
in class java.lang.Object
public JSTypeExpression clone()
clone
in class java.lang.Object