org.jboss.forge.parser.java
Interface AnnotationTarget<O extends JavaSource<O>,T>
- All Superinterfaces:
- Internal, Origin<O>
- All Known Subinterfaces:
- Field<O>, JavaAnnotation, JavaClass, JavaEnum, JavaInterface, JavaSource<T>, JavaType<T>, Member<O,T>, Method<O>
- All Known Implementing Classes:
- AbstractJavaSource, AbstractJavaSourceMemberHolder, FieldImpl, JavaAnnotationImpl, JavaClassImpl, JavaEnumImpl, JavaInterfaceImpl, MethodImpl
public interface AnnotationTarget<O extends JavaSource<O>,T>
- extends Internal, Origin<O>
- Author:
- Lincoln Baxter, III
addAnnotation
Annotation<O> addAnnotation()
- Add a new annotation instance to this
T
. (Note that an import statement must be added manually if
required.)
addAnnotation
Annotation<O> addAnnotation(Class<? extends Annotation> type)
- Add a new annotation instance to this
T
, using the given Class
as the annotation type. Attempt to
add an import statement to this object's O
if required.
addAnnotation
Annotation<O> addAnnotation(String className)
- Add a new annotation instance to this
T
, using the given String
className as the annotation type.
Attempt to add an import statement to this object's O
if required. (Note that the given className must be
fully-qualified in order to properly import required classes)
getAnnotations
List<Annotation<O>> getAnnotations()
hasAnnotation
boolean hasAnnotation(Class<? extends Annotation> type)
hasAnnotation
boolean hasAnnotation(String type)
getAnnotation
Annotation<O> getAnnotation(Class<? extends Annotation> type)
getAnnotation
Annotation<O> getAnnotation(String type)
removeAnnotation
T removeAnnotation(Annotation<O> annotation)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.