Class MultiAndExpression


  • public class MultiAndExpression
    extends Expression
    Represents a multi-and expression.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • MultiAndExpression

        public MultiAndExpression​(AbstractCallExpression... expressions)
                           throws VilException
        Creates a multi-and expression.
        Parameters:
        expressions - the individual expressions
        Throws:
        VilException - if expressions or an expression within is null
    • Method Detail

      • getExpressionCount

        public int getExpressionCount()
        Returns the number of expressions represented by this expression.
        Returns:
        the number of expressions
      • getExpression

        public AbstractCallExpression getExpression​(int index)
        Returns the specified expression.
        Parameters:
        index - the 0-based index
        Returns:
        the expression
        Throws:
        java.lang.IndexOutOfBoundsException - if index<0 || index >=getExpressionCount()
      • 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)