Class ExpressionLet


  • public final class ExpressionLet
    extends Expression
    Expression that decorates the resulting (proxied) AST node of a given expression by a name, value and tag. This class is immutable.
    Author:
    Tilman Kamp - Initial contribution
    • Constructor Detail

      • ExpressionLet

        public ExpressionLet​(String name,
                             Expression subExpression)
        Constructs a new instance.
        Parameters:
        name - the name that should be set on the node. Null, if the node's name should not be changed.
        subExpression - the expression who's resulting node should be altered
      • ExpressionLet

        public ExpressionLet​(Expression subExpression,
                             Object value)
        Constructs a new instance.
        Parameters:
        subExpression - the expression who's resulting node should be altered
        value - the value that should be set on the node. Null, if the node's value should not be changed.
      • ExpressionLet

        public ExpressionLet​(String name,
                             Expression subExpression,
                             Object value,
                             Object tag)
        Constructs a new instance.
        Parameters:
        name - the name that should be set on the node. Null, if the node's name should not be changed.
        subExpression - the expression who's resulting node should be altered
        value - the value that should be set on the node. Null, if the node's value should not be changed.
        tag - the tag that should be set on the node. Null, if the node's tag should not be changed.
    • Method Detail

      • getSubExpression

        public Expression getSubExpression()
        Returns:
        the subExpression
      • getName

        public String getName()
        Returns:
        the name
      • getValue

        public Object getValue()
        Returns:
        the value
      • getTag

        public Object getTag()
        Returns:
        the tag