Package org.jibx.schema.codegen
Class NewInstanceBuilder
java.lang.Object
org.jibx.schema.codegen.ASTBuilderBase
org.jibx.schema.codegen.ExpressionBuilderBase
org.jibx.schema.codegen.NewInstanceBuilder
Abstract syntax tree new instance expression builder. This adds convenience methods and control information to the
base builder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassInstanceCreation
New instance expression.Fields inherited from class org.jibx.schema.codegen.ExpressionBuilderBase
m_expression, m_source
Fields inherited from class org.jibx.schema.codegen.ASTBuilderBase
m_ast
-
Constructor Summary
ConstructorsConstructorDescriptionNewInstanceBuilder
(ClassBuilder source, ClassInstanceCreation expr) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreate an anonymous inner class as the target of this new instance expression.protected void
addOperand
(Expression operand) Add operand to expression.Methods inherited from class org.jibx.schema.codegen.ExpressionBuilderBase
addCharacterLiteralOperand, addNullOperand, addNumberLiteralOperand, addStringLiteralOperand, addVariableOperand, getExpression
Methods inherited from class org.jibx.schema.codegen.ASTBuilderBase
numberLiteral, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStatic, stringLiteral
-
Field Details
-
m_newInstance
private final ClassInstanceCreation m_newInstanceNew instance expression.
-
-
Constructor Details
-
NewInstanceBuilder
Constructor.- Parameters:
source
-expr
-
-
-
Method Details
-
addOperand
protected void addOperand(Expression operand) Add operand to expression. This just adds the supplied operand expression as a new constructor parameter.- Specified by:
addOperand
in classExpressionBuilderBase
- Parameters:
operand
-
-
addAnonymousInnerClass
Create an anonymous inner class as the target of this new instance expression.- Returns:
- class
-