Package org.jibx.schema.codegen
Class ASTBuilderBase
- java.lang.Object
-
- org.jibx.schema.codegen.ASTBuilderBase
-
- Direct Known Subclasses:
BodyBuilderBase
,ExpressionBuilderBase
,StatementBuilderBase
public class ASTBuilderBase extends java.lang.Object
Abstract syntax tree builder base class. This wraps the AST with convenience methods.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description protected AST
m_ast
Actual AST instance.
-
Constructor Summary
Constructors Constructor Description ASTBuilderBase(AST ast)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumberLiteral
numberLiteral(java.lang.String value)
Create a number literal.void
setFinal(BodyDeclaration decl)
Set the final flag for a declaration.void
setPrivate(BodyDeclaration decl)
Set the private access flag for a declaration.void
setPrivateFinal(BodyDeclaration decl)
Set declaration as private final.void
setPrivateStaticFinal(BodyDeclaration decl)
Set declaration as private static final.void
setPublic(BodyDeclaration decl)
Set the public access flag for a declaration.void
setPublicStatic(BodyDeclaration decl)
Set declaration as public static.void
setPublicStaticFinal(BodyDeclaration decl)
Set declaration as public static final.void
setStatic(BodyDeclaration decl)
Set the static flag for a declaration.StringLiteral
stringLiteral(java.lang.String value)
Create a string literal.
-
-
-
Method Detail
-
setPublic
public void setPublic(BodyDeclaration decl)
Set the public access flag for a declaration.- Parameters:
decl
-
-
setPrivate
public void setPrivate(BodyDeclaration decl)
Set the private access flag for a declaration.- Parameters:
decl
-
-
setStatic
public void setStatic(BodyDeclaration decl)
Set the static flag for a declaration.- Parameters:
decl
-
-
setFinal
public void setFinal(BodyDeclaration decl)
Set the final flag for a declaration.- Parameters:
decl
-
-
setPrivateFinal
public void setPrivateFinal(BodyDeclaration decl)
Set declaration as private final.- Parameters:
decl
-
-
setPrivateStaticFinal
public void setPrivateStaticFinal(BodyDeclaration decl)
Set declaration as private static final.- Parameters:
decl
-
-
setPublicStatic
public void setPublicStatic(BodyDeclaration decl)
Set declaration as public static.- Parameters:
decl
-
-
setPublicStaticFinal
public void setPublicStaticFinal(BodyDeclaration decl)
Set declaration as public static final.- Parameters:
decl
-
-
stringLiteral
public StringLiteral stringLiteral(java.lang.String value)
Create a string literal.- Parameters:
value
- literal value- Returns:
- literal
-
numberLiteral
public NumberLiteral numberLiteral(java.lang.String value)
Create a number literal.- Parameters:
value
- literal value- Returns:
- literal
-
-