Package org.jboss.jaxb.intros
Class IntroductionsAnnotationReader
java.lang.Object
org.glassfish.jaxb.runtime.v2.model.annotation.AbstractInlineAnnotationReaderImpl<Type,Class,Field,Method>
org.jboss.jaxb.intros.IntroductionsAnnotationReader
- All Implemented Interfaces:
AnnotationReader<Type,,Class, Field, Method> RuntimeAnnotationReader
public class IntroductionsAnnotationReader
extends AbstractInlineAnnotationReaderImpl<Type,Class,Field,Method>
implements RuntimeAnnotationReader
JAXB Annotation Reader for the JAXB RI context interface.
Used for introduction of annotations on bean classes which are not annotated for JAXB. Allows us to use JAXB (and hence JBossWS 2.x+) with unannotated interfaces.
- Author:
- tom.fennelly@jboss.com, Stefan Fussenegger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Set<Class<? extends Annotation>>static Set<Class<? extends Annotation>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGets the fully-qualified name of the method.getAllFieldAnnotations(Field field, Locatable srcPos) Gets all the annotations on a field.getAllMethodAnnotations(Method method, Locatable srcPos) Gets all the annotations on a method.<A extends Annotation>
AgetClassAnnotation(Class<A> annotation, Class clazz, Locatable srcPos) Reads an annotation on a class.Class<?>[]getClassArrayValue(Annotation a, String name) Similar toAnnotationReader.getClassValue(Annotation, String)method but obtains an array parameter.Class<?>getClassValue(Annotation a, String name) Reads a value of an annotation that returns a Class object.<A extends Annotation>
AgetFieldAnnotation(Class<A> annotation, Field field, Locatable srcPos) Reads an annotation on a property that consists of a field.<A extends Annotation>
AgetMethodAnnotation(Class<A> annotation, Method method, Locatable srcPos) <A extends Annotation>
AgetMethodParameterAnnotation(Class<A> annotation, Method method, int paramIndex, Locatable srcPos) Reads an annotation on a parameter of the method.<A extends Annotation>
AgetPackageAnnotation(Class<A> a, Class clazz, Locatable srcPos) Reads an annotation on the package that the given class belongs to.booleanhasClassAnnotation(Class clazz, Class<? extends Annotation> annotationType) Checks if a class has the annotation.booleanhasFieldAnnotation(Class<? extends Annotation> annotationType, Field field) Checks if the given field has an annotation.booleanhasMethodAnnotation(Class<? extends Annotation> annotation, Method method) Methods inherited from class org.glassfish.jaxb.runtime.v2.model.annotation.AbstractInlineAnnotationReaderImpl
getErrorHandler, getMethodAnnotation, hasMethodAnnotation, setErrorHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glassfish.jaxb.core.v2.model.annotation.AnnotationReader
getMethodAnnotation, hasMethodAnnotation, setErrorHandler
-
Field Details
-
AVAILABLE_CLASS_ANNOTATIONS
-
AVAILABLE_MEMBER_ANNOTATIONS
-
-
Constructor Details
-
IntroductionsAnnotationReader
-
-
Method Details
-
getFieldAnnotation
public <A extends Annotation> A getFieldAnnotation(Class<A> annotation, Field field, Locatable srcPos) Description copied from interface:AnnotationReaderReads an annotation on a property that consists of a field.- Specified by:
getFieldAnnotationin interfaceAnnotationReader<Type,Class, Field, Method>
-
hasFieldAnnotation
Description copied from interface:AnnotationReaderChecks if the given field has an annotation.- Specified by:
hasFieldAnnotationin interfaceAnnotationReader<Type,Class, Field, Method>
-
getAllFieldAnnotations
Description copied from interface:AnnotationReaderGets all the annotations on a field.- Specified by:
getAllFieldAnnotationsin interfaceAnnotationReader<Type,Class, Field, Method>
-
getMethodAnnotation
public <A extends Annotation> A getMethodAnnotation(Class<A> annotation, Method method, Locatable srcPos) - Specified by:
getMethodAnnotationin interfaceAnnotationReader<Type,Class, Field, Method>
-
hasMethodAnnotation
- Specified by:
hasMethodAnnotationin interfaceAnnotationReader<Type,Class, Field, Method>
-
getAllMethodAnnotations
Description copied from interface:AnnotationReaderGets all the annotations on a method.- Specified by:
getAllMethodAnnotationsin interfaceAnnotationReader<Type,Class, Field, Method> srcPos- the location from which this annotation is read.
-
getMethodParameterAnnotation
public <A extends Annotation> A getMethodParameterAnnotation(Class<A> annotation, Method method, int paramIndex, Locatable srcPos) Description copied from interface:AnnotationReaderReads an annotation on a parameter of the method.- Specified by:
getMethodParameterAnnotationin interfaceAnnotationReader<Type,Class, Field, Method> - Returns:
- null if the annotation was not found.
-
getClassAnnotation
public <A extends Annotation> A getClassAnnotation(Class<A> annotation, Class clazz, Locatable srcPos) Description copied from interface:AnnotationReaderReads an annotation on a class.- Specified by:
getClassAnnotationin interfaceAnnotationReader<Type,Class, Field, Method>
-
hasClassAnnotation
Description copied from interface:AnnotationReaderChecks if a class has the annotation.- Specified by:
hasClassAnnotationin interfaceAnnotationReader<Type,Class, Field, Method>
-
getPackageAnnotation
Description copied from interface:AnnotationReaderReads an annotation on the package that the given class belongs to.- Specified by:
getPackageAnnotationin interfaceAnnotationReader<Type,Class, Field, Method>
-
getClassValue
Description copied from interface:AnnotationReaderReads a value of an annotation that returns a Class object.Depending on the underlying reflection library, you can't always obtain the
Classobject directly (see the Annotation Processing MirrorTypeException for example), so use this method to avoid that.- Specified by:
getClassValuein interfaceAnnotationReader<Type,Class, Field, Method> name- The name of the annotation parameter to be read.
-
getClassArrayValue
Description copied from interface:AnnotationReaderSimilar toAnnotationReader.getClassValue(Annotation, String)method but obtains an array parameter.- Specified by:
getClassArrayValuein interfaceAnnotationReader<Type,Class, Field, Method>
-
fullName
Description copied from class:AbstractInlineAnnotationReaderImplGets the fully-qualified name of the method. Used for error messages.
-