org.jibx.schema.codegen
Class ExpressionBuilderBase

java.lang.Object
  extended by org.jibx.schema.codegen.ASTBuilderBase
      extended by 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 Summary
protected  Expression m_expression
          Expression under construction.
protected  ClassBuilder m_source
          Source builder.
 
Fields inherited from class org.jibx.schema.codegen.ASTBuilderBase
m_ast
 
Constructor Summary
ExpressionBuilderBase(ClassBuilder source, Expression expr)
          Constructor.
 
Method Summary
 void addCharacterLiteralOperand(char value)
          Add a character literal operand to expression.
 void addNullOperand()
          Add a null literal operand to expression.
 void addNumberLiteralOperand(java.lang.String value)
          Add a number literal operand to expression.
protected abstract  void addOperand(Expression operand)
          Add operand to expression.
 void addStringLiteralOperand(java.lang.String value)
          Add a string literal operand to expression.
 void addVariableOperand(java.lang.String name)
          Add a local variable or field name operand to expression.
(package private)  Expression getExpression()
          Get expression.
 
Methods inherited from class org.jibx.schema.codegen.ASTBuilderBase
numberLiteral, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStatic, stringLiteral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_source

protected final ClassBuilder m_source
Source builder.


m_expression

protected final Expression m_expression
Expression under construction.

Constructor Detail

ExpressionBuilderBase

public ExpressionBuilderBase(ClassBuilder source,
                             Expression expr)
Constructor.

Parameters:
source -
expr -
Method Detail

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(java.lang.String name)
Add a local variable or field name operand to expression.

Parameters:
name -

addStringLiteralOperand

public void addStringLiteralOperand(java.lang.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(java.lang.String value)
Add a number literal operand to expression.

Parameters:
value -

addNullOperand

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



Project Web Site