Class AbstractInlineAnnotationReaderImpl<T,C,F,M>
java.lang.Object
com.sun.xml.bind.v2.model.annotation.AbstractInlineAnnotationReaderImpl<T,C,F,M>
- All Implemented Interfaces:
AnnotationReader<T,
C, F, M>
- Direct Known Subclasses:
InlineAnnotationReaderImpl
,RuntimeInlineAnnotationReader
public abstract class AbstractInlineAnnotationReaderImpl<T,C,F,M>
extends Object
implements AnnotationReader<T,C,F,M>
AnnotationReader
that reads annotation from classes,
not from external binding files.
This is meant to be used as a convenient partial implementation.- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Gets the fully-qualified name of the method.final ErrorHandler
Always return a non-null validErrorHandler
final <A extends Annotation>
AgetMethodAnnotation
(Class<A> annotation, M getter, M setter, Locatable srcPos) Reads an annotation on a property that consists of a getter and a setter.boolean
hasMethodAnnotation
(Class<? extends Annotation> annotation, String propertyName, M getter, M setter, Locatable srcPos) Checks if the given method has an annotation.void
setErrorHandler
(ErrorHandler errorHandler) Sets the error handler that receives errors found during reading annotations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sun.xml.bind.v2.model.annotation.AnnotationReader
getAllFieldAnnotations, getAllMethodAnnotations, getClassAnnotation, getClassArrayValue, getClassValue, getFieldAnnotation, getMethodAnnotation, getMethodParameterAnnotation, getPackageAnnotation, hasClassAnnotation, hasFieldAnnotation, hasMethodAnnotation
-
Constructor Details
-
AbstractInlineAnnotationReaderImpl
public AbstractInlineAnnotationReaderImpl()
-
-
Method Details
-
setErrorHandler
Description copied from interface:AnnotationReader
Sets the error handler that receives errors found during reading annotations.- Specified by:
setErrorHandler
in interfaceAnnotationReader<T,
C, F, M> - Parameters:
errorHandler
- must not be null.
-
getErrorHandler
Always return a non-null validErrorHandler
-
getMethodAnnotation
public final <A extends Annotation> A getMethodAnnotation(Class<A> annotation, M getter, M setter, Locatable srcPos) Description copied from interface:AnnotationReader
Reads an annotation on a property that consists of a getter and a setter.- Specified by:
getMethodAnnotation
in interfaceAnnotationReader<T,
C, F, M>
-
hasMethodAnnotation
public boolean hasMethodAnnotation(Class<? extends Annotation> annotation, String propertyName, M getter, M setter, Locatable srcPos) Description copied from interface:AnnotationReader
Checks if the given method has an annotation.- Specified by:
hasMethodAnnotation
in interfaceAnnotationReader<T,
C, F, M>
-
fullName
Gets the fully-qualified name of the method. Used for error messages.
-