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:
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 StringGets the fully-qualified name of the method.final ErrorHandlerAlways return a non-null validErrorHandlerfinal <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.booleanhasMethodAnnotation(Class<? extends Annotation> annotation, String propertyName, M getter, M setter, Locatable srcPos) Checks if the given method has an annotation.voidsetErrorHandler(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, waitMethods 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:AnnotationReaderSets the error handler that receives errors found during reading annotations.- Specified by:
setErrorHandlerin 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:AnnotationReaderReads an annotation on a property that consists of a getter and a setter.- Specified by:
getMethodAnnotationin 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:AnnotationReaderChecks if the given method has an annotation.- Specified by:
hasMethodAnnotationin interfaceAnnotationReader<T,C, F, M>
-
fullName
Gets the fully-qualified name of the method. Used for error messages.
-