@Generated(value="com.asakusafw.utils.java.model.syntax.ModelFactory") public class ModelFactoryImpl extends Object implements ModelFactory
ModelFactory
.Constructor and Description |
---|
ModelFactoryImpl() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newAssertStatement, newAssignmentExpression, newBreakStatement, newCatchClause, newCompilationUnit, newConstructorReferenceExpression, newContinueStatement, newEnhancedForStatement, newFormalParameterDeclaration, newIfStatement, newImportDeclaration, newLambdaExpression, newLambdaExpression, newLambdaExpression, newMethodReferenceExpression, newPackageDeclaration, newReturnStatement, newSuper, newThis, newTryResource, newTryStatement, newTryStatement, newTryStatement, newTryStatement, newTryStatement, newTryStatement, newTryStatement, newVariableDeclarator, newWildcard, newWildcardExtends, newWildcardSuper
public AlternateConstructorInvocation newAlternateConstructorInvocation(Expression... arguments)
ModelFactory
AlternateConstructorInvocation
object.newAlternateConstructorInvocation
in interface ModelFactory
arguments
- the argumentspublic AlternateConstructorInvocation newAlternateConstructorInvocation(List<? extends Expression> arguments)
ModelFactory
AlternateConstructorInvocation
object.newAlternateConstructorInvocation
in interface ModelFactory
arguments
- the argumentspublic AlternateConstructorInvocation newAlternateConstructorInvocation(List<? extends Type> typeArguments, List<? extends Expression> arguments)
ModelFactory
AlternateConstructorInvocation
object.newAlternateConstructorInvocation
in interface ModelFactory
typeArguments
- the type argumentsarguments
- the argumentspublic AnnotationDeclaration newAnnotationDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends TypeBodyDeclaration> bodyDeclarations)
ModelFactory
AnnotationDeclaration
object.newAnnotationDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type namebodyDeclarations
- the member declarationspublic AnnotationElement newAnnotationElement(SimpleName name, Expression expression)
ModelFactory
AnnotationElement
object.newAnnotationElement
in interface ModelFactory
name
- annotation element nameexpression
- the expression valuepublic AnnotationElementDeclaration newAnnotationElementDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type type, SimpleName name, Expression defaultExpression)
ModelFactory
AnnotationElementDeclaration
object.newAnnotationElementDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationstype
- annotation element typename
- annotation element namedefaultExpression
- the default expression value, or null
if there is no default valuepublic ArrayAccessExpression newArrayAccessExpression(Expression array, Expression index)
ModelFactory
ArrayAccessExpression
object.newArrayAccessExpression
in interface ModelFactory
array
- the array expressionindex
- the index expressionpublic ArrayCreationExpression newArrayCreationExpression(ArrayType type, ArrayInitializer arrayInitializer)
ModelFactory
ArrayCreationExpression
object.newArrayCreationExpression
in interface ModelFactory
type
- the array typearrayInitializer
- the array initializer, or null
if there is no array initializerpublic ArrayCreationExpression newArrayCreationExpression(ArrayType type, List<? extends Expression> dimensionExpressions, ArrayInitializer arrayInitializer)
ModelFactory
ArrayCreationExpression
object.newArrayCreationExpression
in interface ModelFactory
type
- the array typedimensionExpressions
- the dimension expressionsarrayInitializer
- the array initializer, or null
if there is no array initializerpublic ArrayInitializer newArrayInitializer(Expression... elements)
ModelFactory
ArrayInitializer
object.newArrayInitializer
in interface ModelFactory
elements
- the element expressionspublic ArrayInitializer newArrayInitializer(List<? extends Expression> elements)
ModelFactory
ArrayInitializer
object.newArrayInitializer
in interface ModelFactory
elements
- the element expressionspublic ArrayType newArrayType(Type componentType)
ModelFactory
ArrayType
object.newArrayType
in interface ModelFactory
componentType
- the element typepublic AssertStatement newAssertStatement(Expression expression, Expression message)
ModelFactory
AssertStatement
object.newAssertStatement
in interface ModelFactory
expression
- the assertion expressionmessage
- the message expression, or null
if there is no message expressionpublic AssignmentExpression newAssignmentExpression(Expression leftHandSide, InfixOperator operator, Expression rightHandSide)
ModelFactory
AssignmentExpression
object.newAssignmentExpression
in interface ModelFactory
leftHandSide
- the left hand side expressionoperator
- the simple assignment operator, or an infix operator for compound assignmentrightHandSide
- the right hand side expressionpublic BasicType newBasicType(BasicTypeKind typeKind)
ModelFactory
BasicType
object.newBasicType
in interface ModelFactory
typeKind
- the type kindpublic Block newBlock(Statement... statements)
ModelFactory
Block
object.newBlock
in interface ModelFactory
statements
- the statementspublic Block newBlock(List<? extends Statement> statements)
ModelFactory
Block
object.newBlock
in interface ModelFactory
statements
- the statementspublic BlockComment newBlockComment(String string)
ModelFactory
BlockComment
object.newBlockComment
in interface ModelFactory
string
- the comment textpublic BreakStatement newBreakStatement(SimpleName target)
ModelFactory
BreakStatement
object.newBreakStatement
in interface ModelFactory
target
- the target label, or null
if there is no target labelspublic CastExpression newCastExpression(Type type, Expression expression)
ModelFactory
CastExpression
object.newCastExpression
in interface ModelFactory
type
- the target typeexpression
- the termpublic CatchClause newCatchClause(FormalParameterDeclaration parameter, Block body)
ModelFactory
CatchClause
object.newCatchClause
in interface ModelFactory
parameter
- the expression parameterbody
- the catch
blockpublic ClassBody newClassBody(List<? extends TypeBodyDeclaration> bodyDeclarations)
ModelFactory
ClassBody
object.newClassBody
in interface ModelFactory
bodyDeclarations
- the member declarationspublic ClassDeclaration newClassDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, Type superClass, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
ModelFactory
ClassDeclaration
object.newClassDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type namesuperClass
- the super class, or null
if there is no explicit super classsuperInterfaceTypes
- the super interface typesbodyDeclarations
- the member declarationspublic ClassDeclaration newClassDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends TypeParameterDeclaration> typeParameters, Type superClass, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
ModelFactory
ClassDeclaration
object.newClassDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type nametypeParameters
- the type parameterssuperClass
- the super class, or null
if there is no explicit super classsuperInterfaceTypes
- the super interface typesbodyDeclarations
- the member declarationspublic ClassInstanceCreationExpression newClassInstanceCreationExpression(Type type, Expression... arguments)
ModelFactory
ClassInstanceCreationExpression
object.newClassInstanceCreationExpression
in interface ModelFactory
type
- the target typearguments
- the argumentspublic ClassInstanceCreationExpression newClassInstanceCreationExpression(Type type, List<? extends Expression> arguments)
ModelFactory
ClassInstanceCreationExpression
object.newClassInstanceCreationExpression
in interface ModelFactory
type
- the target typearguments
- the argumentspublic ClassInstanceCreationExpression newClassInstanceCreationExpression(Expression qualifier, List<? extends Type> typeArguments, Type type, List<? extends Expression> arguments, ClassBody body)
ModelFactory
ClassInstanceCreationExpression
object.newClassInstanceCreationExpression
in interface ModelFactory
qualifier
- the qualifier expression, or null
if there is no qualifierstypeArguments
- the type argumentstype
- the target typearguments
- the argumentsbody
- the anonymous class body, or null
if the target is not an anonymous classpublic ClassLiteral newClassLiteral(Type type)
ModelFactory
ClassLiteral
object.newClassLiteral
in interface ModelFactory
type
- the target typepublic CompilationUnit newCompilationUnit(PackageDeclaration packageDeclaration, List<? extends ImportDeclaration> importDeclarations, List<? extends TypeDeclaration> typeDeclarations, List<? extends Comment> comments)
ModelFactory
CompilationUnit
object.newCompilationUnit
in interface ModelFactory
packageDeclaration
- the package declaration,
or null
if this compilation unit is on the default (unnamed) packageimportDeclarations
- the import declarationstypeDeclarations
- the type declarationscomments
- the commentspublic ConditionalExpression newConditionalExpression(Expression condition, Expression thenExpression, Expression elseExpression)
ModelFactory
ConditionalExpression
object.newConditionalExpression
in interface ModelFactory
condition
- the condition expressionthenExpression
- the truth expressionelseExpression
- the false expressionpublic ConstructorDeclaration newConstructorDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends FormalParameterDeclaration> formalParameters, List<? extends Statement> statements)
ModelFactory
ConstructorDeclaration
object.newConstructorDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the constructor name (as the simple name of the owner class)formalParameters
- the formal parametersstatements
- the constructor body statementspublic ConstructorDeclaration newConstructorDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, List<? extends TypeParameterDeclaration> typeParameters, SimpleName name, List<? extends FormalParameterDeclaration> formalParameters, List<? extends Type> exceptionTypes, Block body)
ModelFactory
ConstructorDeclaration
object.newConstructorDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationstypeParameters
- the type parametersname
- the constructor name (as the simple name of the owner class)formalParameters
- the formal parametersexceptionTypes
- the exception typesbody
- the constructor bodypublic ContinueStatement newContinueStatement(SimpleName target)
ModelFactory
ContinueStatement
object.newContinueStatement
in interface ModelFactory
target
- the target label, or null
if there is no target labelspublic DoStatement newDoStatement(Statement body, Expression condition)
ModelFactory
DoStatement
object.newDoStatement
in interface ModelFactory
body
- the loop bodycondition
- the condition expressionpublic DocBlock newDocBlock(String tag, List<? extends DocElement> elements)
ModelFactory
DocBlock
object.newDocBlock
in interface ModelFactory
tag
- the block tagelements
- the block elementspublic DocField newDocField(Type type, SimpleName name)
ModelFactory
DocField
object.newDocField
in interface ModelFactory
type
- the field owner type, or null
if it is not specifiedname
- the field namepublic DocMethod newDocMethod(Type type, SimpleName name, List<? extends DocMethodParameter> formalParameters)
ModelFactory
DocMethod
object.newDocMethod
in interface ModelFactory
type
- the member owner type, or null
if it is not specifiedname
- the target method (or constructor) nameformalParameters
- the target method (or constructor) parameterspublic DocMethodParameter newDocMethodParameter(Type type, SimpleName name, boolean variableArity)
ModelFactory
DocMethodParameter
object.newDocMethodParameter
in interface ModelFactory
type
- the parameter typename
- the parameter name, or null
if it is not specifiedvariableArity
- true
if this parameter is variable length, otherwise false
public DocText newDocText(String string)
ModelFactory
DocText
object.newDocText
in interface ModelFactory
string
- the contents stringpublic EmptyStatement newEmptyStatement()
ModelFactory
EmptyStatement
object.newEmptyStatement
in interface ModelFactory
public EnhancedForStatement newEnhancedForStatement(FormalParameterDeclaration parameter, Expression expression, Statement body)
ModelFactory
EnhancedForStatement
object.newEnhancedForStatement
in interface ModelFactory
parameter
- the loop parameterexpression
- the loop targetbody
- the loop bodypublic EnumConstantDeclaration newEnumConstantDeclaration(Javadoc javadoc, SimpleName name, Expression... arguments)
ModelFactory
EnumConstantDeclaration
object.newEnumConstantDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsname
- the enum constant namearguments
- the constructor argumentspublic EnumConstantDeclaration newEnumConstantDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends Expression> arguments, ClassBody body)
ModelFactory
EnumConstantDeclaration
object.newEnumConstantDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the enum constant namearguments
- the constructor argumentsbody
- the class body, or null
if there is no class bodypublic EnumDeclaration newEnumDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends EnumConstantDeclaration> constantDeclarations, TypeBodyDeclaration... bodyDeclarations)
ModelFactory
EnumDeclaration
object.newEnumDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type nameconstantDeclarations
- the enum constant declarationsbodyDeclarations
- the member declarationspublic EnumDeclaration newEnumDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends Type> superInterfaceTypes, List<? extends EnumConstantDeclaration> constantDeclarations, List<? extends TypeBodyDeclaration> bodyDeclarations)
ModelFactory
EnumDeclaration
object.newEnumDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type namesuperInterfaceTypes
- the super interface typesconstantDeclarations
- the enum constant declarationsbodyDeclarations
- the member declarationspublic ExpressionStatement newExpressionStatement(Expression expression)
ModelFactory
ExpressionStatement
object.newExpressionStatement
in interface ModelFactory
expression
- the internal expressionpublic FieldAccessExpression newFieldAccessExpression(Expression qualifier, SimpleName name)
ModelFactory
FieldAccessExpression
object.newFieldAccessExpression
in interface ModelFactory
qualifier
- the qualifier expressionname
- the target field namepublic FieldDeclaration newFieldDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type type, SimpleName name, Expression initializer)
ModelFactory
FieldDeclaration
object.newFieldDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationstype
- the field typename
- the field nameinitializer
- the initializer expression, or null
if it is not specifiedpublic FieldDeclaration newFieldDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type type, List<? extends VariableDeclarator> variableDeclarators)
ModelFactory
FieldDeclaration
object.newFieldDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationstype
- the field typevariableDeclarators
- the variable declaratorspublic ForStatement newForStatement(ForInitializer initialization, Expression condition, StatementExpressionList update, Statement body)
ModelFactory
ForStatement
object.newForStatement
in interface ModelFactory
initialization
- the loop initialization part, or null
if it is not specifiedcondition
- the loop condition, or null
if it is not specifiedupdate
- the loop update part, or null
if it is not specifiedbody
- the loop bodypublic FormalParameterDeclaration newFormalParameterDeclaration(List<? extends Attribute> modifiers, Type type, boolean variableArity, SimpleName name, int extraDimensions)
ModelFactory
FormalParameterDeclaration
object.newFormalParameterDeclaration
in interface ModelFactory
modifiers
- the modifiers and annotationstype
- the parameter typevariableArity
- true
if this parameter is variable arity, otherwise false
name
- the parameter nameextraDimensions
- the extra dimensionspublic IfStatement newIfStatement(Expression condition, Statement thenStatement, Statement elseStatement)
ModelFactory
IfStatement
object.newIfStatement
in interface ModelFactory
condition
- the condition expressionthenStatement
- the truth statementelseStatement
- the false statement, or null
if it is not specifiedpublic ImportDeclaration newImportDeclaration(ImportKind importKind, Name name)
ModelFactory
ImportDeclaration
object.newImportDeclaration
in interface ModelFactory
importKind
- the import kindname
- the import target namepublic InfixExpression newInfixExpression(Expression leftOperand, InfixOperator operator, Expression rightOperand)
ModelFactory
InfixExpression
object.newInfixExpression
in interface ModelFactory
leftOperand
- the left termoperator
- the infix operatorrightOperand
- the right termpublic InitializerDeclaration newInitializerDeclaration(List<? extends Statement> statements)
ModelFactory
InitializerDeclaration
object.newInitializerDeclaration
in interface ModelFactory
statements
- the initializer bodypublic InitializerDeclaration newInitializerDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Block body)
ModelFactory
InitializerDeclaration
object.newInitializerDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsbody
- the initializer bodypublic InstanceofExpression newInstanceofExpression(Expression expression, Type type)
ModelFactory
InstanceofExpression
object.newInstanceofExpression
in interface ModelFactory
expression
- the left termtype
- the target typepublic InterfaceDeclaration newInterfaceDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
ModelFactory
InterfaceDeclaration
object.newInterfaceDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type namesuperInterfaceTypes
- the super interface typesbodyDeclarations
- the member declarationspublic InterfaceDeclaration newInterfaceDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends TypeParameterDeclaration> typeParameters, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
ModelFactory
InterfaceDeclaration
object.newInterfaceDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type nametypeParameters
- the type parameterssuperInterfaceTypes
- the super interface typesbodyDeclarations
- the member declarationspublic Javadoc newJavadoc(List<? extends DocBlock> blocks)
ModelFactory
Javadoc
object.newJavadoc
in interface ModelFactory
blocks
- the doc blockspublic LabeledStatement newLabeledStatement(SimpleName label, Statement body)
ModelFactory
LabeledStatement
object.newLabeledStatement
in interface ModelFactory
label
- the label namebody
- the body statementpublic LambdaExpression newLambdaExpression(List<? extends LambdaParameter> parameters, LambdaBody body)
ModelFactory
LambdaExpression
object.newLambdaExpression
in interface ModelFactory
parameters
- the lambda parametersbody
- the lambda bodypublic LambdaExpression newLambdaExpression(LambdaParameter parameter, LambdaBody body)
ModelFactory
LambdaExpression
object.newLambdaExpression
in interface ModelFactory
parameter
- the lambda parameter namebody
- the lambda bodypublic LineComment newLineComment(String string)
ModelFactory
LineComment
object.newLineComment
in interface ModelFactory
string
- the comment textpublic Literal newLiteral(String token)
ModelFactory
Literal
object.newLiteral
in interface ModelFactory
token
- the literal tokenpublic LocalClassDeclaration newLocalClassDeclaration(ClassDeclaration declaration)
ModelFactory
LocalClassDeclaration
object.newLocalClassDeclaration
in interface ModelFactory
declaration
- the target class declarationpublic LocalVariableDeclaration newLocalVariableDeclaration(Type type, SimpleName name, Expression initializer)
ModelFactory
LocalVariableDeclaration
object.newLocalVariableDeclaration
in interface ModelFactory
type
- the variable typename
- the variable nameinitializer
- the initializer expression, or null
if it is not specifiedpublic LocalVariableDeclaration newLocalVariableDeclaration(List<? extends Attribute> modifiers, Type type, List<? extends VariableDeclarator> variableDeclarators)
ModelFactory
LocalVariableDeclaration
object.newLocalVariableDeclaration
in interface ModelFactory
modifiers
- the modifiers and annotationstype
- the variable typevariableDeclarators
- the variable declaratorspublic MarkerAnnotation newMarkerAnnotation(NamedType type)
ModelFactory
MarkerAnnotation
object.newMarkerAnnotation
in interface ModelFactory
type
- the annotation typepublic MethodDeclaration newMethodDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type returnType, SimpleName name, List<? extends FormalParameterDeclaration> formalParameters, List<? extends Statement> statements)
ModelFactory
MethodDeclaration
object.newMethodDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsreturnType
- the return typename
- the method nameformalParameters
- the formal parametersstatements
- the method body, or null
if the method does not have any method bodypublic MethodDeclaration newMethodDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, List<? extends TypeParameterDeclaration> typeParameters, Type returnType, SimpleName name, List<? extends FormalParameterDeclaration> formalParameters, int extraDimensions, List<? extends Type> exceptionTypes, Block body)
ModelFactory
MethodDeclaration
object.newMethodDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationstypeParameters
- the type parametersreturnType
- the return typename
- the method nameformalParameters
- the formal parametersextraDimensions
- the extra dimensionsexceptionTypes
- the exception typesbody
- the method body, or null
if the method does not have any method bodypublic MethodInvocationExpression newMethodInvocationExpression(Expression qualifier, SimpleName name, Expression... arguments)
ModelFactory
MethodInvocationExpression
object.newMethodInvocationExpression
in interface ModelFactory
qualifier
- the qualifier expression or type qualifier,
or null
if there is no qualifier expression (indicates a simple method invocation)name
- the method namearguments
- the argumentspublic MethodInvocationExpression newMethodInvocationExpression(Expression qualifier, SimpleName name, List<? extends Expression> arguments)
ModelFactory
MethodInvocationExpression
object.newMethodInvocationExpression
in interface ModelFactory
qualifier
- the qualifier expression or type qualifier,
or null
if there is no qualifier expression (indicates a simple method invocation)name
- the method namearguments
- the argumentspublic MethodInvocationExpression newMethodInvocationExpression(Expression qualifier, List<? extends Type> typeArguments, SimpleName name, List<? extends Expression> arguments)
ModelFactory
MethodInvocationExpression
object.newMethodInvocationExpression
in interface ModelFactory
qualifier
- the qualifier expression or type qualifier,
or null
if there is no qualifier expression (indicates a simple method invocation)typeArguments
- the type argumentsname
- the method namearguments
- the argumentspublic ConstructorReferenceExpressionImpl newConstructorReferenceExpression(Type qualifier, List<? extends Type> typeArguments)
ModelFactory
ConstructorReferenceExpression
object.newConstructorReferenceExpression
in interface ModelFactory
qualifier
- the type owner typetypeArguments
- the type argumentspublic MethodReferenceExpressionImpl newMethodReferenceExpression(TypeOrExpression qualifier, List<? extends Type> typeArguments, SimpleName name)
ModelFactory
MethodReferenceExpression
object.newMethodReferenceExpression
in interface ModelFactory
qualifier
- the qualifier expression or type qualifiertypeArguments
- the type argumentsname
- the method namepublic Modifier newModifier(ModifierKind modifierKind)
ModelFactory
Modifier
object.newModifier
in interface ModelFactory
modifierKind
- the modifier kindpublic NamedType newNamedType(Name name)
ModelFactory
NamedType
object.newNamedType
in interface ModelFactory
name
- the type namepublic NormalAnnotation newNormalAnnotation(NamedType type, List<? extends AnnotationElement> elements)
ModelFactory
NormalAnnotation
object.newNormalAnnotation
in interface ModelFactory
type
- the annotation typeelements
- the annotation elementspublic PackageDeclaration newPackageDeclaration(Javadoc javadoc, List<? extends Annotation> annotations, Name name)
ModelFactory
PackageDeclaration
object.newPackageDeclaration
in interface ModelFactory
javadoc
- the documentation comments, or null
if there is no documentation commentsannotations
- the annotationsname
- the package namepublic ParameterizedType newParameterizedType(Type type, Type... typeArguments)
ModelFactory
ParameterizedType
object.newParameterizedType
in interface ModelFactory
type
- the non parameterized typetypeArguments
- the type argumentspublic ParameterizedType newParameterizedType(Type type, List<? extends Type> typeArguments)
ModelFactory
ParameterizedType
object.newParameterizedType
in interface ModelFactory
type
- the non parameterized typetypeArguments
- the type argumentspublic ParenthesizedExpression newParenthesizedExpression(Expression expression)
ModelFactory
ParenthesizedExpression
object.newParenthesizedExpression
in interface ModelFactory
expression
- the internal expressionpublic PostfixExpression newPostfixExpression(Expression operand, PostfixOperator operator)
ModelFactory
PostfixExpression
object.newPostfixExpression
in interface ModelFactory
operand
- the term expressionoperator
- the postfix operatorpublic QualifiedName newQualifiedName(Name qualifier, SimpleName simpleName)
ModelFactory
QualifiedName
object.newQualifiedName
in interface ModelFactory
qualifier
- the qualifiersimpleName
- the simple namepublic QualifiedType newQualifiedType(Type qualifier, SimpleName simpleName)
ModelFactory
QualifiedType
object.newQualifiedType
in interface ModelFactory
qualifier
- the qualifier typesimpleName
- the simple namepublic ReturnStatement newReturnStatement(Expression expression)
ModelFactory
ReturnStatement
object.newReturnStatement
in interface ModelFactory
expression
- the expression, or null
if this does not return anythingpublic SimpleName newSimpleName(String string)
ModelFactory
SimpleName
object.newSimpleName
in interface ModelFactory
string
- the identifierpublic SingleElementAnnotation newSingleElementAnnotation(NamedType type, Expression expression)
ModelFactory
SingleElementAnnotation
object.newSingleElementAnnotation
in interface ModelFactory
type
- the annotation typeexpression
- the value
element expressionpublic StatementExpressionList newStatementExpressionList(Expression... expressions)
ModelFactory
StatementExpressionList
object.newStatementExpressionList
in interface ModelFactory
expressions
- the expression listpublic StatementExpressionList newStatementExpressionList(List<? extends Expression> expressions)
ModelFactory
StatementExpressionList
object.newStatementExpressionList
in interface ModelFactory
expressions
- the expression listpublic Super newSuper(NamedType qualifier)
ModelFactory
Super
object.newSuper
in interface ModelFactory
qualifier
- the type qualifier, or null
if there is no type qualifierpublic SuperConstructorInvocation newSuperConstructorInvocation(Expression... arguments)
ModelFactory
SuperConstructorInvocation
object.newSuperConstructorInvocation
in interface ModelFactory
arguments
- the argumentspublic SuperConstructorInvocation newSuperConstructorInvocation(List<? extends Expression> arguments)
ModelFactory
SuperConstructorInvocation
object.newSuperConstructorInvocation
in interface ModelFactory
arguments
- the argumentspublic SuperConstructorInvocation newSuperConstructorInvocation(Expression qualifier, List<? extends Type> typeArguments, List<? extends Expression> arguments)
ModelFactory
SuperConstructorInvocation
object.newSuperConstructorInvocation
in interface ModelFactory
qualifier
- the qualifier expression, or null
if there is no qualifiertypeArguments
- the type argumentsarguments
- the argumentspublic SwitchCaseLabel newSwitchCaseLabel(Expression expression)
ModelFactory
SwitchCaseLabel
object.newSwitchCaseLabel
in interface ModelFactory
expression
- the case
label valuepublic SwitchDefaultLabel newSwitchDefaultLabel()
ModelFactory
SwitchDefaultLabel
object.newSwitchDefaultLabel
in interface ModelFactory
public SwitchStatement newSwitchStatement(Expression expression, List<? extends Statement> statements)
ModelFactory
SwitchStatement
object.newSwitchStatement
in interface ModelFactory
expression
- the selector expressionstatements
- the switch
bodypublic SynchronizedStatement newSynchronizedStatement(Expression expression, Block body)
ModelFactory
SynchronizedStatement
object.newSynchronizedStatement
in interface ModelFactory
expression
- the lock expressionbody
- the body blockpublic This newThis(NamedType qualifier)
ModelFactory
This
object.newThis
in interface ModelFactory
qualifier
- the type qualifier, or null
if there is no type qualifierpublic ThrowStatement newThrowStatement(Expression expression)
ModelFactory
ThrowStatement
object.newThrowStatement
in interface ModelFactory
expression
- the expression to be thrownpublic TryResource newTryResource(FormalParameterDeclaration parameter, Expression expression)
ModelFactory
TryResource
object.newTryResource
in interface ModelFactory
parameter
- the resource variable declarationexpression
- the resource expressionpublic TryStatement newTryStatement(List<? extends TryResource> resources, Block tryBlock, List<? extends CatchClause> catchClauses, Block finallyBlock)
ModelFactory
TryStatement
object.newTryStatement
in interface ModelFactory
resources
- the resource statementstryBlock
- the try
clausecatchClauses
- the catch
clausesfinallyBlock
- the finally
clause, or null
if it is not specifiedpublic TypeParameterDeclaration newTypeParameterDeclaration(SimpleName name, Type... typeBounds)
ModelFactory
TypeParameterDeclaration
object.newTypeParameterDeclaration
in interface ModelFactory
name
- the type variable nametypeBounds
- the bound typespublic TypeParameterDeclaration newTypeParameterDeclaration(SimpleName name, List<? extends Type> typeBounds)
ModelFactory
TypeParameterDeclaration
object.newTypeParameterDeclaration
in interface ModelFactory
name
- the type variable nametypeBounds
- the bound typespublic UnaryExpression newUnaryExpression(UnaryOperator operator, Expression operand)
ModelFactory
UnaryExpression
object.newUnaryExpression
in interface ModelFactory
operator
- the unary operatoroperand
- the term expressionpublic UnionType newUnionType(Type... alternativeTypes)
ModelFactory
UnionType
object.newUnionType
in interface ModelFactory
alternativeTypes
- the alternativespublic UnionType newUnionType(List<? extends Type> alternativeTypes)
ModelFactory
UnionType
object.newUnionType
in interface ModelFactory
alternativeTypes
- the alternativespublic VariableDeclarator newVariableDeclarator(SimpleName name, int extraDimensions, Expression initializer)
ModelFactory
VariableDeclarator
object.newVariableDeclarator
in interface ModelFactory
name
- the variable nameextraDimensions
- the extra dimensionsinitializer
- the initializer expression, or null
if it is not specifiedpublic WhileStatement newWhileStatement(Expression condition, Statement body)
ModelFactory
WhileStatement
object.newWhileStatement
in interface ModelFactory
condition
- the condition expressionbody
- the loop bodypublic Wildcard newWildcard(WildcardBoundKind boundKind, Type typeBound)
ModelFactory
Wildcard
object.newWildcard
in interface ModelFactory
boundKind
- the bound type kindtypeBound
- the bound type, or null
if there is no bound typesCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.