Class ParenthesisExpression


  • public class ParenthesisExpression
    extends Expression
    Represents a parenthesis expression.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • ParenthesisExpression

        ParenthesisExpression()
        Constructor for serialization.
      • ParenthesisExpression

        public ParenthesisExpression​(Expression expr)
        Creates a new parenthesis expression.
        Parameters:
        expr - the expression within the parenthesis
    • Method Detail

      • getExpr

        public Expression getExpr()
        Returns the expression within the parenthesis.
        Returns:
        the expression
      • inferType

        public TypeDescriptor<?> inferType()
                                    throws VilException
        Description copied from class: Expression
        Infers the type of this expression including the type of the contained sub-expressions.
        Specified by:
        inferType in class Expression
        Returns:
        the type of this expression
        Throws:
        VilException - in case that inferring the type fails
      • accept

        public java.lang.Object accept​(IExpressionVisitor visitor)
                                throws VilException
        Description copied from class: Expression
        Visits the expression.
        Specified by:
        accept in class Expression
        Parameters:
        visitor - the visitor
        Returns:
        the result of visiting this expression (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)