Class ExpressionSymbol

    • Constructor Detail

      • ExpressionSymbol

        public ExpressionSymbol​(String name,
                                Expression expression)
        Construct an ExpressionSymbol with name and expression.
    • Method Detail

      • getExpression

        public Expression getExpression()
        Get the expression for this symbol
        Returns:
        Expression for this symbol
      • setExpression

        public void setExpression​(Expression expression)
        Set the expression represented by this symbol.
        Parameters:
        expression - Expression for this expression symbol
      • getType

        public Class getType()
        Get the type of the symbol
        Specified by:
        getType in interface Expression
        Returns:
        Type of the symbol, may be null before resolution
      • acceptVisitor

        public void acceptVisitor​(LanguageVisitor visitor)
        Description copied from interface: LanguageObject
        Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.
        Specified by:
        acceptVisitor in interface LanguageObject
        Parameters:
        visitor - Visitor being used
      • clone

        public Object clone()
        Return a deep copy of this object
        Specified by:
        clone in interface LanguageObject
        Specified by:
        clone in class Symbol
        Returns:
        Deep copy of this object
      • hashCode

        public int hashCode()
        Description copied from class: Symbol
        Return a hash code for this symbol.
        Overrides:
        hashCode in class Symbol
        Returns:
        Hash code
        See Also:
        Symbol.hashCode()
      • equals

        public boolean equals​(Object obj)
        ExpressionSymbol matching is not based upon the name
        Overrides:
        equals in class Symbol
        Parameters:
        obj - Other object
        Returns:
        True if other obj is a Symbol (or subclass) and name is equal
        See Also:
        Symbol.equals(java.lang.Object)