public class AttributeBuilder extends Object
Constructor and Description |
---|
AttributeBuilder(ModelFactory factory)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
AttributeBuilder |
Abstract()
Appends
abstract modifier to this builder. |
AttributeBuilder |
annotation(Annotation annotation)
Appends the annotation to the builder.
|
AttributeBuilder |
annotation(Type type)
Appends the annotation to the builder.
|
AttributeBuilder |
annotation(Type type)
Appends the marker annotation to the builder.
|
AttributeBuilder |
annotation(Type type,
Expression value)
Appends the single element annotation to the builder.
|
AttributeBuilder |
annotation(Type type,
Expression value)
Appends the single element annotation to the builder.
|
AttributeBuilder |
annotation(Type type,
Map<? extends String,? extends Expression> elements)
Adds the specified annotation.
|
AttributeBuilder |
annotation(Type type,
String elementName,
Expression elementValue)
Appends the annotation to the builder.
|
AttributeBuilder |
annotation(Type type,
String elementName1,
Expression elementValue1,
String elementName2,
Expression elementValue2)
Appends the annotation to the builder.
|
AttributeBuilder |
annotation(Type type,
String elementName1,
Expression elementValue1,
String elementName2,
Expression elementValue2,
String elementName3,
Expression elementValue3)
Appends the annotation to the builder.
|
AttributeBuilder |
annotation(Type type,
String elementName1,
Expression elementValue1,
String elementName2,
Expression elementValue2,
String elementName3,
Expression elementValue3,
String elementName4,
Expression elementValue4)
Appends the annotation to the builder.
|
AttributeBuilder |
annotation(Type type,
String elementName1,
Expression elementValue1,
String elementName2,
Expression elementValue2,
String elementName3,
Expression elementValue3,
String elementName4,
Expression elementValue4,
String elementName5,
Expression elementValue5)
Appends the annotation to the builder.
|
AttributeBuilder |
copy()
Returns a copy of this builder.
|
AttributeBuilder |
Default()
Appends
default modifier to this builder. |
AttributeBuilder |
Final()
Appends
final modifier to this builder. |
AttributeBuilder |
modifier(ModifierKind modifier)
Appends the modifier to this builder.
|
AttributeBuilder |
Native()
Appends
native modifier to this builder. |
AttributeBuilder |
Private()
Appends
private modifier to this builder. |
AttributeBuilder |
Protected()
Appends
protected modifier to this builder. |
AttributeBuilder |
Public()
Appends
public modifier to this builder. |
AttributeBuilder |
Static()
Appends
static modifier to this builder. |
AttributeBuilder |
Strictfp()
Appends
strictfp modifier to this builder. |
AttributeBuilder |
Synchronized()
Appends
synchronized modifier to this builder. |
List<Annotation> |
toAnnotations()
Returns the Java annotation list which contains the added annotations as their order.
|
List<Attribute> |
toAttributes()
Returns the attribute list which contains the added attributes as their order.
|
List<Modifier> |
toModifiers()
Returns the Java modifier list which contains the added modifiers as their order.
|
AttributeBuilder |
Transient()
Appends
transient modifier to this builder. |
AttributeBuilder |
Volatile()
Appends
volatile modifier to this builder. |
public AttributeBuilder(ModelFactory factory)
factory
- the Java DOM factoryIllegalArgumentException
- if the parameter is null
public AttributeBuilder copy()
public List<Attribute> toAttributes()
public List<Modifier> toModifiers()
public List<Annotation> toAnnotations()
public AttributeBuilder Public()
public
modifier to this builder.public AttributeBuilder Protected()
protected
modifier to this builder.public AttributeBuilder Private()
private
modifier to this builder.public AttributeBuilder Static()
static
modifier to this builder.public AttributeBuilder Abstract()
abstract
modifier to this builder.public AttributeBuilder Default()
default
modifier to this builder.public AttributeBuilder Native()
native
modifier to this builder.public AttributeBuilder Final()
final
modifier to this builder.public AttributeBuilder Synchronized()
synchronized
modifier to this builder.public AttributeBuilder Transient()
transient
modifier to this builder.public AttributeBuilder Volatile()
volatile
modifier to this builder.public AttributeBuilder Strictfp()
strictfp
modifier to this builder.public AttributeBuilder modifier(ModifierKind modifier)
modifier
- the target modifier kindIllegalArgumentException
- if the parameter is null
public AttributeBuilder annotation(Type type)
type
- the annotation typeIllegalArgumentException
- if the parameter is null
public AttributeBuilder annotation(Type type)
type
- the annotation typeIllegalArgumentException
- if the parameter is null
public AttributeBuilder annotation(Type type, Expression value)
type
- the annotation typevalue
- the annotation valueIllegalArgumentException
- if the parameters are null
public AttributeBuilder annotation(Type type, Expression value)
type
- the annotation typevalue
- the annotation valueIllegalArgumentException
- if the parameters are null
public AttributeBuilder annotation(Type type, Map<? extends String,? extends Expression> elements)
type
- the target annotation typeelements
- the element name-value pairsIllegalArgumentException
- if some parameters were null
public AttributeBuilder annotation(Type type, String elementName, Expression elementValue)
type
- the annotation typeelementName
- the element nameelementValue
- the element valueIllegalArgumentException
- if the parameters are null
public AttributeBuilder annotation(Type type, String elementName1, Expression elementValue1, String elementName2, Expression elementValue2)
type
- the annotation typeelementName1
- the element name (1)elementValue1
- the element value (1)elementName2
- the element name (2)elementValue2
- the element value (2)IllegalArgumentException
- if the parameters are null
public AttributeBuilder annotation(Type type, String elementName1, Expression elementValue1, String elementName2, Expression elementValue2, String elementName3, Expression elementValue3)
type
- the annotation typeelementName1
- the element name (1)elementValue1
- the element value (1)elementName2
- the element name (2)elementValue2
- the element value (2)elementName3
- the element name (3)elementValue3
- the element value (3)IllegalArgumentException
- if the parameters are null
public AttributeBuilder annotation(Type type, String elementName1, Expression elementValue1, String elementName2, Expression elementValue2, String elementName3, Expression elementValue3, String elementName4, Expression elementValue4)
type
- the annotation typeelementName1
- the element name (1)elementValue1
- the element value (1)elementName2
- the element name (2)elementValue2
- the element value (2)elementName3
- the element name (3)elementValue3
- the element value (3)elementName4
- the element name (4)elementValue4
- the element value (4)IllegalArgumentException
- if the parameters are null
public AttributeBuilder annotation(Type type, String elementName1, Expression elementValue1, String elementName2, Expression elementValue2, String elementName3, Expression elementValue3, String elementName4, Expression elementValue4, String elementName5, Expression elementValue5)
type
- the annotation typeelementName1
- the element name (1)elementValue1
- the element value (1)elementName2
- the element name (2)elementValue2
- the element value (2)elementName3
- the element name (3)elementValue3
- the element value (3)elementName4
- the element name (4)elementValue4
- the element value (4)elementName5
- the element name (5)elementValue5
- the element value (5)IllegalArgumentException
- if the parameters are null
public AttributeBuilder annotation(Annotation annotation)
annotation
- the target annotationIllegalArgumentException
- if the parameter is null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.