Package org.jboss.forge.roaster.model
Interface AnnotationTarget<O extends JavaType<O>>
-
- All Known Subinterfaces:
AnnotationElement<O>,AnnotationElementSource,AnnotationTargetSource<O,T>,EnumConstant<O>,EnumConstant.ReadBody<O>,EnumConstantSource,EnumConstantSource.Body,Field<O>,FieldSource<O>,JavaAnnotation<O>,JavaAnnotationSource,JavaClass<O>,JavaClassSource,JavaEnum<O>,JavaEnumSource,JavaInterface<O>,JavaInterfaceSource,JavaPackageInfo<O>,JavaPackageInfoSource,JavaRecord<O>,JavaRecordSource,JavaSource<T>,JavaType<T>,Member<O>,MemberSource<O,T>,Method<O,T>,MethodSource<O>,Parameter<O>,ParameterSource<O>,Property<O>,PropertySource<O>
public interface AnnotationTarget<O extends JavaType<O>> extends Internal, Origin<O>
Represents a Java element that may carry annotations.- Author:
- Lincoln Baxter, III
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Annotation<O>getAnnotation(Class<? extends Annotation> type)Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't existAnnotation<O>getAnnotation(String type)Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't existList<? extends Annotation<O>>getAnnotations()booleanhasAnnotation(Class<? extends Annotation> type)Check if annotation bound of the given type in thisAnnotationTargetexistsbooleanhasAnnotation(String type)Check if annotation bound of the given type in thisAnnotationTargetexists-
Methods inherited from interface org.jboss.forge.roaster.Internal
getInternal
-
-
-
-
Method Detail
-
getAnnotations
List<? extends Annotation<O>> getAnnotations()
-
hasAnnotation
boolean hasAnnotation(Class<? extends Annotation> type)
Check if annotation bound of the given type in thisAnnotationTargetexists- Parameters:
type- TheAnnotationtype
-
hasAnnotation
boolean hasAnnotation(String type)
Check if annotation bound of the given type in thisAnnotationTargetexists- Parameters:
type- The FQN of the annotation
-
getAnnotation
Annotation<O> getAnnotation(Class<? extends Annotation> type)
Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't exist- Parameters:
type- TheAnnotationtype
-
getAnnotation
Annotation<O> getAnnotation(String type)
Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't exist- Parameters:
type- The FQN of the annotation
-
-