Class JSTypeExpression

  • All Implemented Interfaces:
    java.io.Serializable

    public final class JSTypeExpression
    extends java.lang.Object
    implements java.io.Serializable
    Represents a type expression as a miniature Rhino AST, so that the type expression can be evaluated later.
    See Also:
    Serialized Form
    • Constructor Detail

      • JSTypeExpression

        public JSTypeExpression​(Node root,
                                java.lang.String sourceName)
    • Method Detail

      • makeOptionalArg

        public static JSTypeExpression makeOptionalArg​(JSTypeExpression expr)
        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.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getRoot

        public Node getRoot()
        Returns:
        The source for this type expression. Note that it will not contain an expression if there's an @override tag.