Class SideEffectVisitor

  • All Implemented Interfaces:
    NodeVisitor<java.lang.Object>

    public abstract class SideEffectVisitor
    extends java.lang.Object
    implements NodeVisitor<java.lang.Object>
    Expression visitor which does not return anything for nodes; instead it performs specific side-effects depending on the expression nodes types.
    • Constructor Detail

      • SideEffectVisitor

        public SideEffectVisitor()
    • Method Detail

      • visit

        public abstract void visit​(PropertyAccess propertyAccess)
      • visit

        public abstract void visit​(Identifier identifier)
      • visit

        public abstract void visit​(UnaryOperation unaryOperation)
      • visit

        public abstract void visit​(RuntimeCall runtimeCall)
      • visit

        public abstract void visit​(MapLiteral mapLiteral)
      • visit

        public abstract void visit​(ArrayLiteral arrayLiteral)
      • visit

        public abstract void visit​(NullLiteral nullLiteral)
      • evaluate

        public java.lang.Object evaluate​(PropertyAccess propertyAccess)
        Description copied from interface: NodeVisitor
        Evaluate a PropertyAccess node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        propertyAccess - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(Identifier identifier)
        Description copied from interface: NodeVisitor
        Evaluate an Identifier node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        identifier - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(BinaryOperation binaryOperation)
        Description copied from interface: NodeVisitor
        Evaluate a BinaryOperation node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        binaryOperation - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(BooleanConstant booleanConstant)
        Description copied from interface: NodeVisitor
        Evaluate a BooleanConstant node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        booleanConstant - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(NumericConstant numericConstant)
        Description copied from interface: NodeVisitor
        Evaluate a NumericConstant node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        numericConstant - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(UnaryOperation unaryOperation)
        Description copied from interface: NodeVisitor
        Evaluate a UnaryOperation node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        unaryOperation - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(TernaryOperator ternaryOperator)
        Description copied from interface: NodeVisitor
        Evaluate a TernaryOperator node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        ternaryOperator - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(RuntimeCall runtimeCall)
        Description copied from interface: NodeVisitor
        Evaluate a RuntimeCall node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        runtimeCall - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(MapLiteral mapLiteral)
        Description copied from interface: NodeVisitor
        Evaluate a MapLiteral node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        mapLiteral - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(ArrayLiteral arrayLiteral)
        Description copied from interface: NodeVisitor
        Evaluate a ArrayLiteral node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        arrayLiteral - the node to evaluate
        Returns:
        the evaluation result
      • evaluate

        public java.lang.Object evaluate​(NullLiteral nullLiteral)
        Description copied from interface: NodeVisitor
        Evaluate a NullLiteral node.
        Specified by:
        evaluate in interface NodeVisitor<java.lang.Object>
        Parameters:
        nullLiteral - the node to evaluate
        Returns:
        the evaluation result