Class ExpressionBuilderBase

java.lang.Object
org.jibx.schema.codegen.ASTBuilderBase
org.jibx.schema.codegen.ExpressionBuilderBase
Direct Known Subclasses:
ArrayAccessBuilder, CastBuilder, InfixExpressionBuilder, InvocationBuilder, NewArrayBuilder, NewInstanceBuilder, PrefixExpressionBuilder

public abstract class ExpressionBuilderBase extends ASTBuilderBase
Abstract syntax tree expression builder base. This is used for expressions with multiple component operands. It adds convenience methods and control information to the base builder.
  • Field Details

    • m_source

      protected final ClassBuilder m_source
      Source builder.
    • m_expression

      protected final Expression m_expression
      Expression under construction.
  • Constructor Details

    • ExpressionBuilderBase

      public ExpressionBuilderBase(ClassBuilder source, Expression expr)
      Constructor.
      Parameters:
      source -
      expr -
  • Method Details

    • getExpression

      Expression getExpression()
      Get expression. This is provided only for use by other classes in this package.
      Returns:
      expression
    • addOperand

      protected abstract void addOperand(Expression operand)
      Add operand to expression. This must be implemented by each subclass to handle adding another operand.
      Parameters:
      operand -
    • addVariableOperand

      public void addVariableOperand(String name)
      Add a local variable or field name operand to expression.
      Parameters:
      name -
    • addStringLiteralOperand

      public void addStringLiteralOperand(String value)
      Add a string literal operand to expression.
      Parameters:
      value -
    • addCharacterLiteralOperand

      public void addCharacterLiteralOperand(char value)
      Add a character literal operand to expression.
      Parameters:
      value -
    • addNumberLiteralOperand

      public void addNumberLiteralOperand(String value)
      Add a number literal operand to expression.
      Parameters:
      value -
    • addNullOperand

      public void addNullOperand()
      Add a null literal operand to expression.