public interface ModelFactory
Model
objects.AlternateConstructorInvocation newAlternateConstructorInvocation(Expression... arguments)
AlternateConstructorInvocation
object.arguments
- the argumentsIllegalArgumentException
- if arguments
was null
AlternateConstructorInvocation newAlternateConstructorInvocation(List<? extends Expression> arguments)
AlternateConstructorInvocation
object.arguments
- the argumentsIllegalArgumentException
- if arguments
was null
AlternateConstructorInvocation newAlternateConstructorInvocation(List<? extends Type> typeArguments, List<? extends Expression> arguments)
AlternateConstructorInvocation
object.typeArguments
- the type argumentsarguments
- the argumentsIllegalArgumentException
- if typeArguments
was null
IllegalArgumentException
- if arguments
was null
AnnotationDeclaration newAnnotationDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends TypeBodyDeclaration> bodyDeclarations)
AnnotationDeclaration
object.javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsname
- the simple type namebodyDeclarations
- the member declarationsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if bodyDeclarations
was null
AnnotationElement newAnnotationElement(SimpleName name, Expression expression)
AnnotationElement
object.name
- annotation element nameexpression
- the expression valueIllegalArgumentException
- if name
was null
IllegalArgumentException
- if expression
was null
AnnotationElementDeclaration newAnnotationElementDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type type, SimpleName name, Expression defaultExpression)
AnnotationElementDeclaration
object.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 valueIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if type
was null
IllegalArgumentException
- if name
was null
ArrayAccessExpression newArrayAccessExpression(Expression array, Expression index)
ArrayAccessExpression
object.array
- the array expressionindex
- the index expressionIllegalArgumentException
- if array
was null
IllegalArgumentException
- if index
was null
ArrayCreationExpression newArrayCreationExpression(ArrayType type, ArrayInitializer arrayInitializer)
ArrayCreationExpression
object.type
- the array typearrayInitializer
- the array initializer, or null
if there is no array initializerIllegalArgumentException
- if type
was null
ArrayCreationExpression newArrayCreationExpression(ArrayType type, List<? extends Expression> dimensionExpressions, ArrayInitializer arrayInitializer)
ArrayCreationExpression
object.type
- the array typedimensionExpressions
- the dimension expressionsarrayInitializer
- the array initializer, or null
if there is no array initializerIllegalArgumentException
- if type
was null
IllegalArgumentException
- if dimensionExpressions
was null
ArrayInitializer newArrayInitializer(Expression... elements)
ArrayInitializer
object.elements
- the element expressionsIllegalArgumentException
- if elements
was null
ArrayInitializer newArrayInitializer(List<? extends Expression> elements)
ArrayInitializer
object.elements
- the element expressionsIllegalArgumentException
- if elements
was null
ArrayType newArrayType(Type componentType)
ArrayType
object.componentType
- the element typeIllegalArgumentException
- if componentType
was null
default AssertStatement newAssertStatement(Expression expression)
AssertStatement
object.expression
- the assertion expressionIllegalArgumentException
- if expression
was null
AssertStatement newAssertStatement(Expression expression, Expression message)
AssertStatement
object.expression
- the assertion expressionmessage
- the message expression, or null
if there is no message expressionIllegalArgumentException
- if expression
was null
default AssignmentExpression newAssignmentExpression(Expression leftHandSide, Expression rightHandSide)
AssignmentExpression
object.leftHandSide
- the left hand side expressionrightHandSide
- the right hand side expressionIllegalArgumentException
- if leftHandSide
was null
IllegalArgumentException
- if rightHandSide
was null
AssignmentExpression newAssignmentExpression(Expression leftHandSide, InfixOperator operator, Expression rightHandSide)
AssignmentExpression
object.leftHandSide
- the left hand side expressionoperator
- the simple assignment operator, or an infix operator for compound assignmentrightHandSide
- the right hand side expressionIllegalArgumentException
- if leftHandSide
was null
IllegalArgumentException
- if operator
was null
IllegalArgumentException
- if rightHandSide
was null
BasicType newBasicType(BasicTypeKind typeKind)
BasicType
object.typeKind
- the type kindIllegalArgumentException
- if typeKind
was null
Block newBlock(Statement... statements)
Block
object.statements
- the statementsIllegalArgumentException
- if statements
was null
Block newBlock(List<? extends Statement> statements)
Block
object.statements
- the statementsIllegalArgumentException
- if statements
was null
BlockComment newBlockComment(String string)
BlockComment
object.string
- the comment textIllegalArgumentException
- if string
was null
IllegalArgumentException
- if string
was emptydefault BreakStatement newBreakStatement()
BreakStatement
object.BreakStatement newBreakStatement(SimpleName target)
BreakStatement
object.target
- the target label, or null
if there is no target labelsCastExpression newCastExpression(Type type, Expression expression)
CastExpression
object.type
- the target typeexpression
- the termIllegalArgumentException
- if type
was null
IllegalArgumentException
- if expression
was null
default CatchClause newCatchClause(Type type, SimpleName name, Function<? super SimpleName,? extends Block> body)
CatchClause
object.type
- the exception typename
- the exception parameter namebody
- the catch
block with exception parameter nameIllegalArgumentException
- if parameter
was null
IllegalArgumentException
- if body
was null
CatchClause newCatchClause(FormalParameterDeclaration parameter, Block body)
CatchClause
object.parameter
- the expression parameterbody
- the catch
blockIllegalArgumentException
- if parameter
was null
IllegalArgumentException
- if body
was null
ClassBody newClassBody(List<? extends TypeBodyDeclaration> bodyDeclarations)
ClassBody
object.bodyDeclarations
- the member declarationsIllegalArgumentException
- if bodyDeclarations
was null
ClassDeclaration newClassDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, Type superClass, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
ClassDeclaration
object.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 declarationsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if superInterfaceTypes
was null
IllegalArgumentException
- if bodyDeclarations
was null
ClassDeclaration newClassDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends TypeParameterDeclaration> typeParameters, Type superClass, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
ClassDeclaration
object.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 declarationsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if typeParameters
was null
IllegalArgumentException
- if superInterfaceTypes
was null
IllegalArgumentException
- if bodyDeclarations
was null
ClassInstanceCreationExpression newClassInstanceCreationExpression(Type type, Expression... arguments)
ClassInstanceCreationExpression
object.type
- the target typearguments
- the argumentsIllegalArgumentException
- if type
was null
IllegalArgumentException
- if arguments
was null
ClassInstanceCreationExpression newClassInstanceCreationExpression(Type type, List<? extends Expression> arguments)
ClassInstanceCreationExpression
object.type
- the target typearguments
- the argumentsIllegalArgumentException
- if type
was null
IllegalArgumentException
- if arguments
was null
ClassInstanceCreationExpression newClassInstanceCreationExpression(Expression qualifier, List<? extends Type> typeArguments, Type type, List<? extends Expression> arguments, ClassBody body)
ClassInstanceCreationExpression
object.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 classIllegalArgumentException
- if typeArguments
was null
IllegalArgumentException
- if type
was null
IllegalArgumentException
- if arguments
was null
ClassLiteral newClassLiteral(Type type)
ClassLiteral
object.type
- the target typeIllegalArgumentException
- if type
was null
default CompilationUnit newCompilationUnit(PackageDeclaration packageDeclaration, List<? extends ImportDeclaration> importDeclarations, List<? extends TypeDeclaration> typeDeclarations)
CompilationUnit
object.packageDeclaration
- the package declaration,
or null
if this compilation unit is on the default (unnamed) packageimportDeclarations
- the import declarationstypeDeclarations
- the type declarationsIllegalArgumentException
- if importDeclarations
was null
IllegalArgumentException
- if typeDeclarations
was null
IllegalArgumentException
- if comments
was null
CompilationUnit newCompilationUnit(PackageDeclaration packageDeclaration, List<? extends ImportDeclaration> importDeclarations, List<? extends TypeDeclaration> typeDeclarations, List<? extends Comment> comments)
CompilationUnit
object.packageDeclaration
- the package declaration,
or null
if this compilation unit is on the default (unnamed) packageimportDeclarations
- the import declarationstypeDeclarations
- the type declarationscomments
- the commentsIllegalArgumentException
- if importDeclarations
was null
IllegalArgumentException
- if typeDeclarations
was null
IllegalArgumentException
- if comments
was null
ConditionalExpression newConditionalExpression(Expression condition, Expression thenExpression, Expression elseExpression)
ConditionalExpression
object.condition
- the condition expressionthenExpression
- the truth expressionelseExpression
- the false expressionIllegalArgumentException
- if condition
was null
IllegalArgumentException
- if thenExpression
was null
IllegalArgumentException
- if elseExpression
was null
ConstructorDeclaration newConstructorDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends FormalParameterDeclaration> formalParameters, List<? extends Statement> statements)
ConstructorDeclaration
object.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 statementsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if formalParameters
was null
IllegalArgumentException
- if statements
was null
ConstructorDeclaration newConstructorDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, List<? extends TypeParameterDeclaration> typeParameters, SimpleName name, List<? extends FormalParameterDeclaration> formalParameters, List<? extends Type> exceptionTypes, Block body)
ConstructorDeclaration
object.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 bodyIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if typeParameters
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if formalParameters
was null
IllegalArgumentException
- if exceptionTypes
was null
IllegalArgumentException
- if body
was null
default ContinueStatement newContinueStatement()
ContinueStatement
object.ContinueStatement newContinueStatement(SimpleName target)
ContinueStatement
object.target
- the target label, or null
if there is no target labelsDoStatement newDoStatement(Statement body, Expression condition)
DoStatement
object.body
- the loop bodycondition
- the condition expressionIllegalArgumentException
- if body
was null
IllegalArgumentException
- if condition
was null
DocBlock newDocBlock(String tag, List<? extends DocElement> elements)
DocBlock
object.tag
- the block tagelements
- the block elementsIllegalArgumentException
- if tag
was null
IllegalArgumentException
- if elements
was null
DocField newDocField(Type type, SimpleName name)
DocField
object.type
- the field owner type, or null
if it is not specifiedname
- the field nameIllegalArgumentException
- if name
was null
DocMethod newDocMethod(Type type, SimpleName name, List<? extends DocMethodParameter> formalParameters)
DocMethod
object.type
- the member owner type, or null
if it is not specifiedname
- the target method (or constructor) nameformalParameters
- the target method (or constructor) parametersIllegalArgumentException
- if name
was null
IllegalArgumentException
- if formalParameters
was null
DocMethodParameter newDocMethodParameter(Type type, SimpleName name, boolean variableArity)
DocMethodParameter
object.type
- the parameter typename
- the parameter name, or null
if it is not specifiedvariableArity
- true
if this parameter is variable length, otherwise false
IllegalArgumentException
- if type
was null
DocText newDocText(String string)
DocText
object.string
- the contents stringIllegalArgumentException
- if string
was null
EmptyStatement newEmptyStatement()
EmptyStatement
object.default EnhancedForStatement newEnhancedForStatement(Type type, SimpleName name, Expression expression, Statement body)
EnhancedForStatement
object.type
- the loop variable typename
- the loop variable nameexpression
- the loop targetbody
- the loop bodyIllegalArgumentException
- if parameter
was null
IllegalArgumentException
- if expression
was null
IllegalArgumentException
- if body
was null
EnhancedForStatement newEnhancedForStatement(FormalParameterDeclaration parameter, Expression expression, Statement body)
EnhancedForStatement
object.parameter
- the loop parameterexpression
- the loop targetbody
- the loop bodyIllegalArgumentException
- if parameter
was null
IllegalArgumentException
- if expression
was null
IllegalArgumentException
- if body
was null
EnumConstantDeclaration newEnumConstantDeclaration(Javadoc javadoc, SimpleName name, Expression... arguments)
EnumConstantDeclaration
object.javadoc
- the documentation comments, or null
if there is no documentation commentsname
- the enum constant namearguments
- the constructor argumentsIllegalArgumentException
- if name
was null
IllegalArgumentException
- if arguments
was null
EnumConstantDeclaration newEnumConstantDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends Expression> arguments, ClassBody body)
EnumConstantDeclaration
object.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 bodyIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if arguments
was null
EnumDeclaration newEnumDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends EnumConstantDeclaration> constantDeclarations, TypeBodyDeclaration... bodyDeclarations)
EnumDeclaration
object.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 declarationsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if constantDeclarations
was null
IllegalArgumentException
- if bodyDeclarations
was null
EnumDeclaration newEnumDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends Type> superInterfaceTypes, List<? extends EnumConstantDeclaration> constantDeclarations, List<? extends TypeBodyDeclaration> bodyDeclarations)
EnumDeclaration
object.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 declarationsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if superInterfaceTypes
was null
IllegalArgumentException
- if constantDeclarations
was null
IllegalArgumentException
- if bodyDeclarations
was null
ExpressionStatement newExpressionStatement(Expression expression)
ExpressionStatement
object.expression
- the internal expressionIllegalArgumentException
- if expression
was null
FieldAccessExpression newFieldAccessExpression(Expression qualifier, SimpleName name)
FieldAccessExpression
object.qualifier
- the qualifier expressionname
- the target field nameIllegalArgumentException
- if qualifier
was null
IllegalArgumentException
- if name
was null
FieldDeclaration newFieldDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type type, SimpleName name, Expression initializer)
FieldDeclaration
object.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 specifiedIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if type
was null
IllegalArgumentException
- if name
was null
FieldDeclaration newFieldDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type type, List<? extends VariableDeclarator> variableDeclarators)
FieldDeclaration
object.javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationstype
- the field typevariableDeclarators
- the variable declaratorsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if type
was null
IllegalArgumentException
- if variableDeclarators
was null
IllegalArgumentException
- if variableDeclarators
was emptyForStatement newForStatement(ForInitializer initialization, Expression condition, StatementExpressionList update, Statement body)
ForStatement
object.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 bodyIllegalArgumentException
- if body
was null
default FormalParameterDeclaration newFormalParameterDeclaration(Type type, SimpleName name)
FormalParameterDeclaration
object.type
- the parameter typename
- the parameter nameIllegalArgumentException
- if type
was null
IllegalArgumentException
- if name
was null
FormalParameterDeclaration newFormalParameterDeclaration(List<? extends Attribute> modifiers, Type type, boolean variableArity, SimpleName name, int extraDimensions)
FormalParameterDeclaration
object.modifiers
- the modifiers and annotationstype
- the parameter typevariableArity
- true
if this parameter is variable arity, otherwise false
name
- the parameter nameextraDimensions
- the extra dimensionsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if type
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if extraDimensions
was negative valuedefault IfStatement newIfStatement(Expression condition, Statement thenStatement)
IfStatement
object.condition
- the condition expressionthenStatement
- the truth statementIllegalArgumentException
- if condition
was null
IllegalArgumentException
- if thenStatement
was null
IfStatement newIfStatement(Expression condition, Statement thenStatement, Statement elseStatement)
IfStatement
object.condition
- the condition expressionthenStatement
- the truth statementelseStatement
- the false statement, or null
if it is not specifiedIllegalArgumentException
- if condition
was null
IllegalArgumentException
- if thenStatement
was null
default ImportDeclaration newImportDeclaration(Name name)
ImportDeclaration
object.name
- the import target nameIllegalArgumentException
- if importKind
was null
IllegalArgumentException
- if name
was null
ImportDeclaration newImportDeclaration(ImportKind importKind, Name name)
ImportDeclaration
object.importKind
- the import kindname
- the import target nameIllegalArgumentException
- if importKind
was null
IllegalArgumentException
- if name
was null
InfixExpression newInfixExpression(Expression leftOperand, InfixOperator operator, Expression rightOperand)
InfixExpression
object.leftOperand
- the left termoperator
- the infix operatorrightOperand
- the right termIllegalArgumentException
- if leftOperand
was null
IllegalArgumentException
- if operator
was null
IllegalArgumentException
- if rightOperand
was null
InitializerDeclaration newInitializerDeclaration(List<? extends Statement> body)
InitializerDeclaration
object.body
- the initializer bodyIllegalArgumentException
- if body
was null
InitializerDeclaration newInitializerDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Block body)
InitializerDeclaration
object.javadoc
- the documentation comments, or null
if there is no documentation commentsmodifiers
- the modifiers and annotationsbody
- the initializer bodyIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if body
was null
InstanceofExpression newInstanceofExpression(Expression expression, Type type)
InstanceofExpression
object.expression
- the left termtype
- the target typeIllegalArgumentException
- if expression
was null
IllegalArgumentException
- if type
was null
InterfaceDeclaration newInterfaceDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
InterfaceDeclaration
object.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 declarationsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if superInterfaceTypes
was null
IllegalArgumentException
- if bodyDeclarations
was null
InterfaceDeclaration newInterfaceDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, SimpleName name, List<? extends TypeParameterDeclaration> typeParameters, List<? extends Type> superInterfaceTypes, List<? extends TypeBodyDeclaration> bodyDeclarations)
InterfaceDeclaration
object.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 declarationsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if typeParameters
was null
IllegalArgumentException
- if superInterfaceTypes
was null
IllegalArgumentException
- if bodyDeclarations
was null
Javadoc newJavadoc(List<? extends DocBlock> blocks)
Javadoc
object.blocks
- the doc blocksIllegalArgumentException
- if blocks
was null
LabeledStatement newLabeledStatement(SimpleName label, Statement body)
LabeledStatement
object.label
- the label namebody
- the body statementIllegalArgumentException
- if label
was null
IllegalArgumentException
- if body
was null
LambdaExpression newLambdaExpression(List<? extends LambdaParameter> parameters, LambdaBody body)
LambdaExpression
object.parameters
- the lambda parametersbody
- the lambda bodyIllegalArgumentException
- if parameters
was null
IllegalArgumentException
- if body
was null
LambdaExpression newLambdaExpression(LambdaParameter parameter, LambdaBody body)
LambdaExpression
object.parameter
- the lambda parameter namebody
- the lambda bodyIllegalArgumentException
- if parameters
was null
IllegalArgumentException
- if body
was null
default LambdaExpression newLambdaExpression(LambdaBody body)
LambdaExpression
object.body
- the lambda bodyIllegalArgumentException
- if parameters
was null
IllegalArgumentException
- if body
was null
default LambdaExpression newLambdaExpression(List<? extends LambdaParameter> parameters, Function<? super List<? extends SimpleName>,? extends LambdaBody> lambda)
LambdaExpression
object.parameters
- the lambda parameterslambda
- the lambda function bodyIllegalArgumentException
- if parameters
was null
IllegalArgumentException
- if body
was null
default LambdaExpression newLambdaExpression(LambdaParameter parameter, Function<? super SimpleName,? extends LambdaBody> lambda)
LambdaExpression
object.parameter
- the lambda parameter namelambda
- the lambda function bodyIllegalArgumentException
- if parameters
was null
IllegalArgumentException
- if body
was null
LineComment newLineComment(String string)
LineComment
object.string
- the comment textIllegalArgumentException
- if string
was null
IllegalArgumentException
- if string
was emptyLiteral newLiteral(String token)
Literal
object.token
- the literal tokenIllegalArgumentException
- if token
was null
IllegalArgumentException
- if token
was emptyLocalClassDeclaration newLocalClassDeclaration(ClassDeclaration declaration)
LocalClassDeclaration
object.declaration
- the target class declarationIllegalArgumentException
- if declaration
was null
LocalVariableDeclaration newLocalVariableDeclaration(Type type, SimpleName name, Expression initializer)
LocalVariableDeclaration
object.type
- the variable typename
- the variable nameinitializer
- the initializer expression, or null
if it is not specifiedIllegalArgumentException
- if type
was null
IllegalArgumentException
- if name
was null
LocalVariableDeclaration newLocalVariableDeclaration(List<? extends Attribute> modifiers, Type type, List<? extends VariableDeclarator> variableDeclarators)
LocalVariableDeclaration
object.modifiers
- the modifiers and annotationstype
- the variable typevariableDeclarators
- the variable declaratorsIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if type
was null
IllegalArgumentException
- if variableDeclarators
was null
IllegalArgumentException
- if variableDeclarators
was emptyMarkerAnnotation newMarkerAnnotation(NamedType type)
MarkerAnnotation
object.type
- the annotation typeIllegalArgumentException
- if type
was null
MethodDeclaration newMethodDeclaration(Javadoc javadoc, List<? extends Attribute> modifiers, Type returnType, SimpleName name, List<? extends FormalParameterDeclaration> formalParameters, List<? extends Statement> statements)
MethodDeclaration
object.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 bodyIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if returnType
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if formalParameters
was null
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)
MethodDeclaration
object.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 bodyIllegalArgumentException
- if modifiers
was null
IllegalArgumentException
- if typeParameters
was null
IllegalArgumentException
- if returnType
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if formalParameters
was null
IllegalArgumentException
- if extraDimensions
was negativeIllegalArgumentException
- if exceptionTypes
was null
MethodInvocationExpression newMethodInvocationExpression(Expression qualifier, SimpleName name, Expression... arguments)
MethodInvocationExpression
object.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 argumentsIllegalArgumentException
- if name
was null
IllegalArgumentException
- if arguments
was null
MethodInvocationExpression newMethodInvocationExpression(Expression qualifier, SimpleName name, List<? extends Expression> arguments)
MethodInvocationExpression
object.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 argumentsIllegalArgumentException
- if name
was null
IllegalArgumentException
- if arguments
was null
MethodInvocationExpression newMethodInvocationExpression(Expression qualifier, List<? extends Type> typeArguments, SimpleName name, List<? extends Expression> arguments)
MethodInvocationExpression
object.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 argumentsIllegalArgumentException
- if typeArguments
was null
IllegalArgumentException
- if name
was null
IllegalArgumentException
- if arguments
was null
default ConstructorReferenceExpression newConstructorReferenceExpression(Type qualifier)
ConstructorReferenceExpression
object.qualifier
- the type owner typeIllegalArgumentException
- if qualifier
was null
ConstructorReferenceExpression newConstructorReferenceExpression(Type qualifier, List<? extends Type> typeArguments)
ConstructorReferenceExpression
object.qualifier
- the type owner typetypeArguments
- the type argumentsIllegalArgumentException
- if qualifier
was null
IllegalArgumentException
- if typeArguments
was null
default MethodReferenceExpression newMethodReferenceExpression(TypeOrExpression qualifier, SimpleName name)
MethodReferenceExpression
object.qualifier
- the qualifier expression or type qualifiername
- the method nameIllegalArgumentException
- if qualifier
was null
IllegalArgumentException
- if name
was null
MethodReferenceExpression newMethodReferenceExpression(TypeOrExpression qualifier, List<? extends Type> typeArguments, SimpleName name)
MethodReferenceExpression
object.qualifier
- the qualifier expression or type qualifiertypeArguments
- the type argumentsname
- the method nameIllegalArgumentException
- if qualifier
was null
IllegalArgumentException
- if typeArguments
was null
IllegalArgumentException
- if name
was null
Modifier newModifier(ModifierKind modifierKind)
Modifier
object.modifierKind
- the modifier kindIllegalArgumentException
- if modifierKind
was null
NamedType newNamedType(Name name)
NamedType
object.name
- the type nameIllegalArgumentException
- if name
was null
NormalAnnotation newNormalAnnotation(NamedType type, List<? extends AnnotationElement> elements)
NormalAnnotation
object.type
- the annotation typeelements
- the annotation elementsIllegalArgumentException
- if type
was null
IllegalArgumentException
- if elements
was null
default PackageDeclaration newPackageDeclaration(Name name)
PackageDeclaration
object.name
- the package nameIllegalArgumentException
- if name
was null
PackageDeclaration newPackageDeclaration(Javadoc javadoc, List<? extends Annotation> annotations, Name name)
PackageDeclaration
object.javadoc
- the documentation comments, or null
if there is no documentation commentsannotations
- the annotationsname
- the package nameIllegalArgumentException
- if annotations
was null
IllegalArgumentException
- if name
was null
ParameterizedType newParameterizedType(Type type, Type... typeArguments)
ParameterizedType
object.type
- the non parameterized typetypeArguments
- the type argumentsIllegalArgumentException
- if type
was null
IllegalArgumentException
- if typeArguments
was null
ParameterizedType newParameterizedType(Type type, List<? extends Type> typeArguments)
ParameterizedType
object.type
- the non parameterized typetypeArguments
- the type argumentsIllegalArgumentException
- if type
was null
IllegalArgumentException
- if typeArguments
was null
ParenthesizedExpression newParenthesizedExpression(Expression expression)
ParenthesizedExpression
object.expression
- the internal expressionIllegalArgumentException
- if expression
was null
PostfixExpression newPostfixExpression(Expression operand, PostfixOperator operator)
PostfixExpression
object.operand
- the term expressionoperator
- the postfix operatorIllegalArgumentException
- if operand
was null
IllegalArgumentException
- if operator
was null
QualifiedName newQualifiedName(Name qualifier, SimpleName simpleName)
QualifiedName
object.qualifier
- the qualifiersimpleName
- the simple nameIllegalArgumentException
- if qualifier
was null
IllegalArgumentException
- if simpleName
was null
QualifiedType newQualifiedType(Type qualifier, SimpleName simpleName)
QualifiedType
object.qualifier
- the qualifier typesimpleName
- the simple nameIllegalArgumentException
- if qualifier
was null
IllegalArgumentException
- if simpleName
was null
default ReturnStatement newReturnStatement()
ReturnStatement
object.ReturnStatement newReturnStatement(Expression expression)
ReturnStatement
object.expression
- the expression, or null
if this does not return anythingSimpleName newSimpleName(String string)
SimpleName
object.string
- the identifierIllegalArgumentException
- if string
was null
IllegalArgumentException
- if string
was emptySingleElementAnnotation newSingleElementAnnotation(NamedType type, Expression expression)
SingleElementAnnotation
object.type
- the annotation typeexpression
- the value
element expressionIllegalArgumentException
- if type
was null
IllegalArgumentException
- if expression
was null
StatementExpressionList newStatementExpressionList(Expression... expressions)
StatementExpressionList
object.expressions
- the expression listIllegalArgumentException
- if expressions
was null
IllegalArgumentException
- if expressions
was emptyStatementExpressionList newStatementExpressionList(List<? extends Expression> expressions)
StatementExpressionList
object.expressions
- the expression listIllegalArgumentException
- if expressions
was null
IllegalArgumentException
- if expressions
was emptySuper newSuper(NamedType qualifier)
Super
object.qualifier
- the type qualifier, or null
if there is no type qualifierSuperConstructorInvocation newSuperConstructorInvocation(Expression... arguments)
SuperConstructorInvocation
object.arguments
- the argumentsIllegalArgumentException
- if arguments
was null
SuperConstructorInvocation newSuperConstructorInvocation(List<? extends Expression> arguments)
SuperConstructorInvocation
object.arguments
- the argumentsIllegalArgumentException
- if arguments
was null
SuperConstructorInvocation newSuperConstructorInvocation(Expression qualifier, List<? extends Type> typeArguments, List<? extends Expression> arguments)
SuperConstructorInvocation
object.qualifier
- the qualifier expression, or null
if there is no qualifiertypeArguments
- the type argumentsarguments
- the argumentsIllegalArgumentException
- if typeArguments
was null
IllegalArgumentException
- if arguments
was null
SwitchCaseLabel newSwitchCaseLabel(Expression expression)
SwitchCaseLabel
object.expression
- the case
label valueIllegalArgumentException
- if expression
was null
SwitchDefaultLabel newSwitchDefaultLabel()
SwitchDefaultLabel
object.SwitchStatement newSwitchStatement(Expression expression, List<? extends Statement> statements)
SwitchStatement
object.expression
- the selector expressionstatements
- the switch
bodyIllegalArgumentException
- if expression
was null
IllegalArgumentException
- if statements
was null
SynchronizedStatement newSynchronizedStatement(Expression expression, Block body)
SynchronizedStatement
object.expression
- the lock expressionbody
- the body blockIllegalArgumentException
- if expression
was null
IllegalArgumentException
- if body
was null
This newThis(NamedType qualifier)
This
object.qualifier
- the type qualifier, or null
if there is no type qualifierThrowStatement newThrowStatement(Expression expression)
ThrowStatement
object.expression
- the expression to be thrownIllegalArgumentException
- if expression
was null
default TryResource newTryResource(Type type, SimpleName name, Expression expression)
TryResource
object.type
- the resource typename
- the resource nameexpression
- the resource expressionIllegalArgumentException
- if parameters are null
TryResource newTryResource(FormalParameterDeclaration parameter, Expression expression)
TryResource
object.parameter
- the resource variable declarationexpression
- the resource expressionIllegalArgumentException
- if parameters are null
default TryStatement newTryStatement(Block tryBlock, List<? extends CatchClause> catchClauses)
TryStatement
object.tryBlock
- the try
clausecatchClauses
- the catch
clausesIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
default TryStatement newTryStatement(Block tryBlock, Block finallyBlock)
TryStatement
object.tryBlock
- the try
clausefinallyBlock
- the finally
clause, or null
if it is not specifiedIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
default TryStatement newTryStatement(Block tryBlock, List<? extends CatchClause> catchClauses, Block finallyBlock)
TryStatement
object.tryBlock
- the try
clausecatchClauses
- the catch
clausesfinallyBlock
- the finally
clause, or null
if it is not specifiedIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
default TryStatement newTryStatement(TryResource resource, Block tryBlock)
TryStatement
object.resource
- the resource statementtryBlock
- the try
clauseIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
default TryStatement newTryStatement(List<? extends TryResource> resources, Block tryBlock)
TryStatement
object.resources
- the resource statementstryBlock
- the try
clauseIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
default TryStatement newTryStatement(List<? extends TryResource> resources, Block tryBlock, List<? extends CatchClause> catchClauses)
TryStatement
object.resources
- the resource statementstryBlock
- the try
clausecatchClauses
- the catch
clausesIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
default TryStatement newTryStatement(List<? extends TryResource> resources, Block tryBlock, Block finallyBlock)
TryStatement
object.resources
- the resource statementstryBlock
- the try
clausefinallyBlock
- the finally
clause, or null
if it is not specifiedIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
TryStatement newTryStatement(List<? extends TryResource> resources, Block tryBlock, List<? extends CatchClause> catchClauses, Block finallyBlock)
TryStatement
object.resources
- the resource statementstryBlock
- the try
clausecatchClauses
- the catch
clausesfinallyBlock
- the finally
clause, or null
if it is not specifiedIllegalArgumentException
- if tryBlock
was null
IllegalArgumentException
- if catchClauses
was null
TypeParameterDeclaration newTypeParameterDeclaration(SimpleName name, Type... typeBounds)
TypeParameterDeclaration
object.name
- the type variable nametypeBounds
- the bound typesIllegalArgumentException
- if name
was null
IllegalArgumentException
- if typeBounds
was null
TypeParameterDeclaration newTypeParameterDeclaration(SimpleName name, List<? extends Type> typeBounds)
TypeParameterDeclaration
object.name
- the type variable nametypeBounds
- the bound typesIllegalArgumentException
- if name
was null
IllegalArgumentException
- if typeBounds
was null
UnaryExpression newUnaryExpression(UnaryOperator operator, Expression operand)
UnaryExpression
object.operator
- the unary operatoroperand
- the term expressionIllegalArgumentException
- if operator
was null
IllegalArgumentException
- if operand
was null
UnionType newUnionType(List<? extends Type> alternativeTypes)
UnionType
object.alternativeTypes
- the alternativesIllegalArgumentException
- if alternativeTypes
was null
IllegalArgumentException
- if alternativeTypes
was emptyUnionType newUnionType(Type... alternativeTypes)
UnionType
object.alternativeTypes
- the alternativesIllegalArgumentException
- if alternativeTypes
was null
IllegalArgumentException
- if alternativeTypes
was emptydefault VariableDeclarator newVariableDeclarator(SimpleName name, Expression initializer)
VariableDeclarator
object.name
- the variable nameinitializer
- the initializer expression, or null
if it is not specifiedIllegalArgumentException
- if name
was null
VariableDeclarator newVariableDeclarator(SimpleName name, int extraDimensions, Expression initializer)
VariableDeclarator
object.name
- the variable nameextraDimensions
- the extra dimensionsinitializer
- the initializer expression, or null
if it is not specifiedIllegalArgumentException
- if name
was null
IllegalArgumentException
- if extraDimensions
was negativeWhileStatement newWhileStatement(Expression condition, Statement body)
WhileStatement
object.condition
- the condition expressionbody
- the loop bodyIllegalArgumentException
- if condition
was null
IllegalArgumentException
- if body
was null
default Wildcard newWildcard()
Wildcard
object.default Wildcard newWildcardExtends(Type typeBound)
Wildcard
object with upper bound type.typeBound
- the bound type, or null
if there is no bound typesdefault Wildcard newWildcardSuper(Type typeBound)
Wildcard
object with lower bound type.typeBound
- the bound type, or null
if there is no bound typesWildcard newWildcard(WildcardBoundKind boundKind, Type typeBound)
Wildcard
object.boundKind
- the bound type kindtypeBound
- the bound type, or null
if there is no bound typesIllegalArgumentException
- if boundKind
was null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.