Package org.jboss.jdeparser
Class BasicJAnnotatable
- java.lang.Object
-
- org.jboss.jdeparser.BasicJCommentable
-
- org.jboss.jdeparser.AbstractJDocCommentable
-
- org.jboss.jdeparser.BasicJAnnotatable
-
- All Implemented Interfaces:
JAnnotatable
,JCommentable
,JDocCommentable
- Direct Known Subclasses:
AbstractJGeneric
,FirstJVarDeclaration
,ImplJEnumConstant
,ImplJParamDeclaration
class BasicJAnnotatable extends AbstractJDocCommentable implements JAnnotatable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<ImplJAnnotation>
annotations
-
Constructor Summary
Constructors Constructor Description BasicJAnnotatable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ImplJAnnotation
add(ImplJAnnotation item)
JAnnotation
annotate(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Add an annotation.JAnnotation
annotate(java.lang.String type)
Add an annotation.JAnnotation
annotate(JType type)
Add an annotation.(package private) void
writeAnnotations(SourceFileWriter writer, FormatPreferences.Space space)
-
Methods inherited from class org.jboss.jdeparser.AbstractJDocCommentable
deprecated, docComment, writeDocComments
-
Methods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeComments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
-
-
-
-
Field Detail
-
annotations
private java.util.ArrayList<ImplJAnnotation> annotations
-
-
Method Detail
-
add
private ImplJAnnotation add(ImplJAnnotation item)
-
annotate
public JAnnotation annotate(java.lang.String type)
Description copied from interface:JAnnotatable
Add an annotation.- Specified by:
annotate
in interfaceJAnnotatable
- Parameters:
type
- the type of the annotation to add- Returns:
- the new annotation
-
annotate
public JAnnotation annotate(JType type)
Description copied from interface:JAnnotatable
Add an annotation.- Specified by:
annotate
in interfaceJAnnotatable
- Parameters:
type
- the type of the annotation to add- Returns:
- the new annotation
-
annotate
public JAnnotation annotate(java.lang.Class<? extends java.lang.annotation.Annotation> type)
Description copied from interface:JAnnotatable
Add an annotation.- Specified by:
annotate
in interfaceJAnnotatable
- Parameters:
type
- the type of the annotation to add- Returns:
- the new annotation
-
writeAnnotations
void writeAnnotations(SourceFileWriter writer, FormatPreferences.Space space) throws java.io.IOException
- Throws:
java.io.IOException
-
-