Package com.google.javascript.rhino
Class JSTypeExpression
java.lang.Object
com.google.javascript.rhino.JSTypeExpression
- All Implemented Interfaces:
Serializable
Represents a type expression as a miniature Rhino AST, so that the
type expression can be evaluated later.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluate
(StaticScope<JSType> scope, JSTypeRegistry registry) Evaluates the type expression into aJSType
object.getRoot()
int
hashCode()
boolean
boolean
static JSTypeExpression
Make the given type expression into an optional type expression, if possible.
-
Constructor Details
-
JSTypeExpression
-
-
Method Details
-
makeOptionalArg
Make the given type expression into an optional type expression, if possible. -
isOptionalArg
public boolean isOptionalArg()- Returns:
- Whether this expression denotes an optional
@param
.
-
isVarArgs
public boolean isVarArgs()- Returns:
- Whether this expression denotes a rest args
@param
.
-
evaluate
Evaluates the type expression into aJSType
object. -
equals
-
hashCode
public int hashCode() -
getRoot
- Returns:
- The source for this type expression. Note that it will not contain an expression if there's an @override tag.
-