public interface AnnotationAttribute extends Codeable
Annotation
. It consists
of a key-value pair, where the value may be a single or multiple values.Modifier and Type | Method and Description |
---|---|
AnnotationAttribute |
addValue(Expression value) |
AnnotationAttribute |
addValueAnnotation(Annotation valueAnnotation) |
AnnotationAttribute |
addValues(Iterable<Expression> values) |
String |
getName() |
Expression |
getValue() |
Annotation |
getValueAnnotation() |
Annotation[] |
getValueAnnotations() |
List<Expression> |
getValuesCopy() |
boolean |
isArray()
Returns if more than one value is set.
|
boolean |
isDefaultValueAttribute()
Returns, if this attribute is the default value (i.e., maps to the
parameter
value , but is set without name. |
AnnotationAttribute |
setArray(boolean isArray)
Deprecated.
Array property should not be settable, but is derived from
the number of values.
|
AnnotationAttribute |
setName(String name)
Sets the name of this attribute.
|
AnnotationAttribute |
setValue(Expression value) |
AnnotationAttribute |
setValueAnnotation(Annotation valueAnnotation) |
AnnotationAttribute |
setValueAnnotations(Annotation[] valueAnnotation) |
applyStyle, cast, getComment, isActive, isBlockWithAbruptCompletion, setComment, toCode, visit, vm
AnnotationAttribute addValue(Expression value)
AnnotationAttribute addValues(Iterable<Expression> values)
AnnotationAttribute addValueAnnotation(Annotation valueAnnotation)
List<Expression> getValuesCopy()
String getName()
value
in the annotation is referenced),
the name is the empty String.Expression getValue()
null
if
no value is set.boolean isDefaultValueAttribute()
value
, but is set without name. The name is not
printed, only the value is.Annotation getValueAnnotation()
Annotation[] getValueAnnotations()
boolean isArray()
@Deprecated AnnotationAttribute setArray(boolean isArray)
AnnotationAttribute setName(String name)
name
- The parameter name of the attribute in the annotation. If this
is the only attribute and it is named value
, you can
provide an empty String for concise output code. null
is normalized to the empty String.AnnotationAttribute setValueAnnotation(Annotation valueAnnotation)
AnnotationAttribute setValueAnnotations(Annotation[] valueAnnotation)
AnnotationAttribute setValue(Expression value)
Copyright © 2000–2018 jenesis4java. All rights reserved.