Forge - Parent 1.0.5-SNAPSHOT

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

Method Summary
 Annotation<O> addAnnotation()
          Add a new annotation instance to this T.
 Annotation<O> addAnnotation(Class<? extends Annotation> type)
          Add a new annotation instance to this T, using the given Class as the annotation type.
 Annotation<O> addAnnotation(String className)
          Add a new annotation instance to this T, using the given String className as the annotation type.
 Annotation<O> getAnnotation(Class<? extends Annotation> type)
           
 Annotation<O> getAnnotation(String type)
           
 List<Annotation<O>> getAnnotations()
           
 boolean hasAnnotation(Class<? extends Annotation> type)
           
 boolean hasAnnotation(String type)
           
 T removeAnnotation(Annotation<O> annotation)
           
 
Methods inherited from interface org.jboss.forge.parser.Internal
getInternal
 
Methods inherited from interface org.jboss.forge.parser.Origin
getOrigin
 

Method Detail

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)

Forge - Parent 1.0.5-SNAPSHOT

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.