Class UnaryExpression

java.lang.Object
org.apache.camel.language.simple.ast.BaseSimpleNode
org.apache.camel.language.simple.ast.UnaryExpression
All Implemented Interfaces:
SimpleNode

public class UnaryExpression extends BaseSimpleNode
Represents an unary expression in the AST
  • Constructor Details

    • UnaryExpression

      public UnaryExpression(SimpleToken token)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class BaseSimpleNode
    • acceptLeft

      public void acceptLeft(SimpleNode left)
      Accepts the left node to this operator
      Parameters:
      left - the left node to accept
    • getOperator

      public UnaryOperatorType getOperator()
    • getLeft

      public SimpleNode getLeft()
    • createExpression

      public org.apache.camel.Expression createExpression(org.apache.camel.CamelContext camelContext, String expression)
      Description copied from interface: SimpleNode
      Creates a Camel Expression based on this model.
      Parameters:
      camelContext - the camel context
      expression - the input string
      Returns:
      the created Expression
    • createCode

      public String createCode(org.apache.camel.CamelContext camelContext, String expression) throws SimpleParserException
      Description copied from interface: SimpleNode
      Creates Java code based on this model.
      Parameters:
      camelContext - the camel context
      expression - the input string
      Returns:
      the created Java code
      Throws:
      SimpleParserException - should be thrown if error parsing the model