Class AnnotationInfo
- java.lang.Object
-
- fish.payara.microprofile.openapi.impl.visitor.AnnotationInfo
-
public final class AnnotationInfo extends Object
Represents the aggregated annotations on a type, its fields and methods including annotations "inherited" from super-classes and implemented interfaces. Should a field or method from a super-class be overridden theAnnotation
closest to the represented type (the overriding one) is kept.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.glassfish.hk2.classmodel.reflect.AnnotationModel
getAnnotation(Class<? extends Annotation> annotationType)
Version ofClass.getAnnotation(Class)
also considering annotations "inherited" from super-types for thisgetType()
.org.glassfish.hk2.classmodel.reflect.AnnotationModel
getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.AnnotatedElement element)
Version ofAnnotatedElement#getAnnotation(Class)
also considering annotations "inherited" from super-types.org.glassfish.hk2.classmodel.reflect.AnnotationModel
getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.FieldModel field)
Version ofField.getAnnotation(Class)
also considering annotations "inherited" from overridden fields of super-types.org.glassfish.hk2.classmodel.reflect.AnnotationModel
getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.MethodModel method)
Version ofMethod.getAnnotation(Class)
also considering annotations "inherited" from overridden methods of super-types.org.glassfish.hk2.classmodel.reflect.AnnotationModel
getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.Parameter parameter)
Version ofParameter#getAnnotation(Class)
also considering annotations "inherited" from overridden methods of super-types.int
getAnnotationCount(org.glassfish.hk2.classmodel.reflect.Parameter parameter)
Counts the annotation on aParameter
including those present on same parameter of an overridden method should the method be overridden.String
getAnnotationValue(Class<? extends Annotation> annotationType)
String
getAnnotationValue(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.AnnotatedElement parameter)
org.glassfish.hk2.classmodel.reflect.ExtensibleType<? extends org.glassfish.hk2.classmodel.reflect.ExtensibleType>
getType()
boolean
isAnnotationPresent(Class<? extends Annotation> annotationType)
Version ofClass.isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.boolean
isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.AnnotatedElement element)
Version ofAnnotatedElement#isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.boolean
isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.FieldModel field)
Version ofAccessibleObject.isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.boolean
isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.MethodModel method)
Version ofAccessibleObject.isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.boolean
isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.Parameter parameter)
Version ofParameter#isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.boolean
isAnyAnnotationPresent(org.glassfish.hk2.classmodel.reflect.AnnotatedElement element, Class<? extends Annotation>... annotationTypes)
-
-
-
Method Detail
-
getType
public org.glassfish.hk2.classmodel.reflect.ExtensibleType<? extends org.glassfish.hk2.classmodel.reflect.ExtensibleType> getType()
-
getAnnotation
public org.glassfish.hk2.classmodel.reflect.AnnotationModel getAnnotation(Class<? extends Annotation> annotationType)
Version ofClass.getAnnotation(Class)
also considering annotations "inherited" from super-types for thisgetType()
.- Parameters:
annotationType
- annotation type to check- Returns:
- the annotation of the given type if present or
null
otherwise
-
getAnnotation
public org.glassfish.hk2.classmodel.reflect.AnnotationModel getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.FieldModel field)
Version ofField.getAnnotation(Class)
also considering annotations "inherited" from overridden fields of super-types.
-
getAnnotation
public org.glassfish.hk2.classmodel.reflect.AnnotationModel getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.MethodModel method)
Version ofMethod.getAnnotation(Class)
also considering annotations "inherited" from overridden methods of super-types.
-
getAnnotation
public org.glassfish.hk2.classmodel.reflect.AnnotationModel getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.Parameter parameter)
Version ofParameter#getAnnotation(Class)
also considering annotations "inherited" from overridden methods of super-types.
-
getAnnotationValue
public String getAnnotationValue(Class<? extends Annotation> annotationType)
-
getAnnotationValue
public String getAnnotationValue(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.AnnotatedElement parameter)
-
getAnnotation
public org.glassfish.hk2.classmodel.reflect.AnnotationModel getAnnotation(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.AnnotatedElement element)
Version ofAnnotatedElement#getAnnotation(Class)
also considering annotations "inherited" from super-types.
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Version ofClass.isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.- Parameters:
annotationType
- annotation type to check- Returns:
- true in case it is present at this class or any of its super-types
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.FieldModel field)
Version ofAccessibleObject.isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.- Parameters:
annotationType
- annotation type to check- Returns:
- true in case it is present at the given field. The field must be defined in this
getType()
or any of its super-types.
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.MethodModel method)
Version ofAccessibleObject.isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.- Parameters:
annotationType
- annotation type to checkmethod
- the method checked for annotation. The method must be defined or inherited by thisgetType()
or any of its super-types.- Returns:
- true in case it is present at the given method, else false
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.Parameter parameter)
Version ofParameter#isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.- Parameters:
annotationType
- annotation type to checkparameter
- the parameter checked for annotations. The parameter must belong to a method defined or inherited by thisgetType()
- Returns:
- true in case it is present at the given parameter, else false
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType, org.glassfish.hk2.classmodel.reflect.AnnotatedElement element)
Version ofAnnotatedElement#isAnnotationPresent(Class)
also considering annotations "inherited" from super-types.
-
isAnyAnnotationPresent
@SafeVarargs public final boolean isAnyAnnotationPresent(org.glassfish.hk2.classmodel.reflect.AnnotatedElement element, Class<? extends Annotation>... annotationTypes)
-
getAnnotationCount
public int getAnnotationCount(org.glassfish.hk2.classmodel.reflect.Parameter parameter)
Counts the annotation on aParameter
including those present on same parameter of an overridden method should the method be overridden.- Parameters:
parameter
- the parameter of which to count annotations for- Returns:
- the number of annotation present on the given
Parameter
including annotations present on the same parameter of an potentially overridden method.
-
-