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>,JavaRecordComponent<O>,JavaRecordComponentSource,JavaRecordSource,JavaSource<T>,JavaType<T>,Member<O>,MemberSource<O,,T> Method<O,,T> MethodSource<O>,Parameter<O>,ParameterSource<O>,Property<O>,PropertySource<O>
Represents a Java element that may carry annotations.
- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescriptiongetAnnotation(Class<? extends Annotation> type) Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't existgetAnnotation(String type) Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't existList<? extends Annotation<O>>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 thisAnnotationTargetexistsMethods inherited from interface org.jboss.forge.roaster.Internal
getInternal
-
Method Details
-
getAnnotations
List<? extends Annotation<O>> getAnnotations() -
hasAnnotation
Check if annotation bound of the given type in thisAnnotationTargetexists- Parameters:
type- TheAnnotationtype
-
hasAnnotation
Check if annotation bound of the given type in thisAnnotationTargetexists- Parameters:
type- The FQN of the annotation
-
getAnnotation
Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't exist- Parameters:
type- TheAnnotationtype
-
getAnnotation
Returns the annotation bound of the given type in thisAnnotationTargetor null if it doesn't exist- Parameters:
type- The FQN of the annotation
-