Package org.jboss.jdeparser
Class ImplJAnnotation
- java.lang.Object
-
- org.jboss.jdeparser.ImplJAnnotation
-
- All Implemented Interfaces:
JAnnotation
,Writable
class ImplJAnnotation extends java.lang.Object implements JAnnotation, Writable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.LinkedHashMap<java.lang.String,Writable>
properties
private JType
type
-
Constructor Summary
Constructors Constructor Description ImplJAnnotation(JType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(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, java.lang.String 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(JType type)
Set the "value" 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(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, java.lang.String 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(JType type)
Set the "value" property of this annotation to a nested annotation of the given type.JAnnotation
value(java.lang.String literal)
Set the "value" property of this annotation to a string.JAnnotation
value(java.lang.String name, java.lang.String literal)
Set the named property of this annotation to a string.JAnnotation
value(java.lang.String name, JExpr expr)
Set the named property of this annotation.JAnnotation
value(JExpr expr)
Set the "value" property of this annotation.void
write(SourceFileWriter writer)
-
-
-
Constructor Detail
-
ImplJAnnotation
ImplJAnnotation(JType type)
-
-
Method Detail
-
value
public JAnnotation value(JExpr expr)
Description copied from interface:JAnnotation
Set the "value" property of this annotation. To set an array of values, seeJExprs.array(JExpr...)
.- Specified by:
value
in interfaceJAnnotation
- Parameters:
expr
- the annotation value- Returns:
- this annotation
-
value
public JAnnotation value(java.lang.String literal)
Description copied from interface:JAnnotation
Set the "value" property of this annotation to a string.- Specified by:
value
in interfaceJAnnotation
- Parameters:
literal
- the annotation value string- Returns:
- this annotation
-
annotationValue
public JAnnotation annotationValue(java.lang.String type)
Description copied from interface:JAnnotation
Set the "value" property of this annotation to a nested annotation of the given type.- Specified by:
annotationValue
in interfaceJAnnotation
- Parameters:
type
- the annotation type- Returns:
- the nested annotation
-
annotationValue
public JAnnotation annotationValue(JType type)
Description copied from interface:JAnnotation
Set the "value" property of this annotation to a nested annotation of the given type.- Specified by:
annotationValue
in interfaceJAnnotation
- Parameters:
type
- the annotation type- Returns:
- the nested annotation
-
annotationValue
public JAnnotation annotationValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Description copied from interface:JAnnotation
Set the "value" property of this annotation to a nested annotation of the given type.- Specified by:
annotationValue
in interfaceJAnnotation
- Parameters:
type
- the annotation type- Returns:
- the nested annotation
-
annotationArrayValue
public JAnnotationArray annotationArrayValue(java.lang.String type)
Description copied from interface:JAnnotation
Set the "value" property of this annotation to an array of nested annotations of the given type.- Specified by:
annotationArrayValue
in interfaceJAnnotation
- Parameters:
type
- the annotation array element type- Returns:
- the nested annotation
-
annotationArrayValue
public JAnnotationArray annotationArrayValue(JType type)
Description copied from interface:JAnnotation
Set the "value" property of this annotation to an array of nested annotations of the given type.- Specified by:
annotationArrayValue
in interfaceJAnnotation
- Parameters:
type
- the annotation array element type- Returns:
- the nested annotation
-
annotationArrayValue
public JAnnotationArray annotationArrayValue(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Description copied from interface:JAnnotation
Set the "value" property of this annotation to an array of nested annotations of the given type.- Specified by:
annotationArrayValue
in interfaceJAnnotation
- Parameters:
type
- the annotation array element type- Returns:
- the nested annotation
-
value
public JAnnotation value(java.lang.String name, java.lang.String literal)
Description copied from interface:JAnnotation
Set the named property of this annotation to a string.- Specified by:
value
in interfaceJAnnotation
- Parameters:
name
- the annotation property nameliteral
- the annotation value string- Returns:
- this annotation
-
value
public JAnnotation value(java.lang.String name, JExpr expr)
Description copied from interface:JAnnotation
Set the named property of this annotation. To set an array of values, seeJExprs.array(JExpr...)
.- Specified by:
value
in interfaceJAnnotation
- Parameters:
name
- the annotation property nameexpr
- the annotation value- Returns:
- this annotation
-
annotationValue
public JAnnotation annotationValue(java.lang.String name, java.lang.String type)
Description copied from interface:JAnnotation
Set the named property of this annotation to a nested annotation of the given type.- Specified by:
annotationValue
in interfaceJAnnotation
type
- the annotation type- Returns:
- the nested annotation
-
annotationValue
public JAnnotation annotationValue(java.lang.String name, JType type)
Description copied from interface:JAnnotation
Set the named property of this annotation to a nested annotation of the given type.- Specified by:
annotationValue
in interfaceJAnnotation
type
- the annotation type- Returns:
- the nested annotation
-
annotationValue
public JAnnotation annotationValue(java.lang.String name, java.lang.Class<? extends java.lang.annotation.Annotation> type)
Description copied from interface:JAnnotation
Set the named property of this annotation to a nested annotation of the given type.- Specified by:
annotationValue
in interfaceJAnnotation
type
- the annotation type- Returns:
- the nested annotation
-
annotationArrayValue
public JAnnotationArray annotationArrayValue(java.lang.String name, java.lang.String type)
Description copied from interface:JAnnotation
Set the named property of this annotation to an array of nested annotations of the given type.- Specified by:
annotationArrayValue
in interfaceJAnnotation
type
- the annotation array element type- Returns:
- the nested annotation
-
annotationArrayValue
public JAnnotationArray annotationArrayValue(java.lang.String name, JType type)
Description copied from interface:JAnnotation
Set the named property of this annotation to an array of nested annotations of the given type.- Specified by:
annotationArrayValue
in interfaceJAnnotation
type
- the annotation array element type- Returns:
- the nested annotation
-
annotationArrayValue
public JAnnotationArray annotationArrayValue(java.lang.String name, java.lang.Class<? extends java.lang.annotation.Annotation> type)
Description copied from interface:JAnnotation
Set the named property of this annotation to an array of nested annotations of the given type.- Specified by:
annotationArrayValue
in interfaceJAnnotation
type
- the annotation array element type- Returns:
- the nested annotation
-
write
public void write(SourceFileWriter writer) throws java.io.IOException
-
-