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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(StaticScope<JSType> scope, JSTypeRegistry registry) Evaluates the type expression into aJSTypeobject.getRoot()inthashCode()booleanbooleanstatic JSTypeExpressionMake 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 aJSTypeobject. -
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.
-