class ImplJAnnotation extends java.lang.Object implements JAnnotation, Writable
Modifier and Type | Field and Description |
---|---|
private java.util.LinkedHashMap<java.lang.String,Writable> |
properties |
private JType |
type |
Constructor and Description |
---|
ImplJAnnotation(JType type) |
Modifier and Type | Method and Description |
---|---|
JAnnotationArray |
annotationArrayValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Set the "value" property of this annotation to an array of nested annotations of the given type.
|
JAnnotationArray |
annotationArrayValue(JType type)
Set the "value" property of this annotation to an array of nested annotations of the given type.
|
JAnnotationArray |
annotationArrayValue(java.lang.String type)
Set the "value" property of this annotation to an array of nested annotations of the given type.
|
JAnnotationArray |
annotationArrayValue(java.lang.String name,
java.lang.Class<? extends java.lang.annotation.Annotation> type)
Set the named property of this annotation to an array of nested annotations of the given type.
|
JAnnotationArray |
annotationArrayValue(java.lang.String name,
JType type)
Set the named property of this annotation to an array of nested annotations of the given type.
|
JAnnotationArray |
annotationArrayValue(java.lang.String name,
java.lang.String type)
Set the named property of this annotation to an array of nested annotations of the given type.
|
JAnnotation |
annotationValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Set the "value" property of this annotation to a nested annotation of the given type.
|
JAnnotation |
annotationValue(JType type)
Set the "value" property of this annotation to a nested annotation of the given type.
|
JAnnotation |
annotationValue(java.lang.String type)
Set the "value" property of this annotation to a nested annotation of the given type.
|
JAnnotation |
annotationValue(java.lang.String name,
java.lang.Class<? extends java.lang.annotation.Annotation> type)
Set the named property of this annotation to a nested annotation of the given type.
|
JAnnotation |
annotationValue(java.lang.String name,
JType type)
Set the named property of this annotation to a nested annotation of the given type.
|
JAnnotation |
annotationValue(java.lang.String name,
java.lang.String type)
Set the named property of this annotation to a nested annotation of the given type.
|
JAnnotation |
value(JExpr expr)
Set the "value" property of this annotation.
|
JAnnotation |
value(java.lang.String literal)
Set the "value" property of this annotation to a string.
|
JAnnotation |
value(java.lang.String name,
JExpr expr)
Set the named property of this annotation.
|
JAnnotation |
value(java.lang.String name,
java.lang.String literal)
Set the named property of this annotation to a string.
|
void |
write(SourceFileWriter writer) |
private final JType type
private java.util.LinkedHashMap<java.lang.String,Writable> properties
ImplJAnnotation(JType type)
public JAnnotation value(JExpr expr)
JAnnotation
JExprs.array(JExpr...)
.value
in interface JAnnotation
expr
- the annotation valuepublic JAnnotation value(java.lang.String literal)
JAnnotation
value
in interface JAnnotation
literal
- the annotation value stringpublic JAnnotation annotationValue(java.lang.String type)
JAnnotation
annotationValue
in interface JAnnotation
type
- the annotation typepublic JAnnotation annotationValue(JType type)
JAnnotation
annotationValue
in interface JAnnotation
type
- the annotation typepublic JAnnotation annotationValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)
JAnnotation
annotationValue
in interface JAnnotation
type
- the annotation typepublic JAnnotationArray annotationArrayValue(java.lang.String type)
JAnnotation
annotationArrayValue
in interface JAnnotation
type
- the annotation array element typepublic JAnnotationArray annotationArrayValue(JType type)
JAnnotation
annotationArrayValue
in interface JAnnotation
type
- the annotation array element typepublic JAnnotationArray annotationArrayValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)
JAnnotation
annotationArrayValue
in interface JAnnotation
type
- the annotation array element typepublic JAnnotation value(java.lang.String name, java.lang.String literal)
JAnnotation
value
in interface JAnnotation
name
- the annotation property nameliteral
- the annotation value stringpublic JAnnotation value(java.lang.String name, JExpr expr)
JAnnotation
JExprs.array(JExpr...)
.value
in interface JAnnotation
name
- the annotation property nameexpr
- the annotation valuepublic JAnnotation annotationValue(java.lang.String name, java.lang.String type)
JAnnotation
annotationValue
in interface JAnnotation
type
- the annotation typepublic JAnnotation annotationValue(java.lang.String name, JType type)
JAnnotation
annotationValue
in interface JAnnotation
type
- the annotation typepublic JAnnotation annotationValue(java.lang.String name, java.lang.Class<? extends java.lang.annotation.Annotation> type)
JAnnotation
annotationValue
in interface JAnnotation
type
- the annotation typepublic JAnnotationArray annotationArrayValue(java.lang.String name, java.lang.String type)
JAnnotation
annotationArrayValue
in interface JAnnotation
type
- the annotation array element typepublic JAnnotationArray annotationArrayValue(java.lang.String name, JType type)
JAnnotation
annotationArrayValue
in interface JAnnotation
type
- the annotation array element typepublic JAnnotationArray annotationArrayValue(java.lang.String name, java.lang.Class<? extends java.lang.annotation.Annotation> type)
JAnnotation
annotationArrayValue
in interface JAnnotation
type
- the annotation array element typepublic void write(SourceFileWriter writer) throws java.io.IOException