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 java.lang.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 Constructor Description AbstractInlineAnnotationReaderImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.String
fullName(M m)
Gets the fully-qualified name of the method.ErrorHandler
getErrorHandler()
Always return a non-null validErrorHandler
<A extends java.lang.annotation.Annotation>
AgetMethodAnnotation(java.lang.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(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.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
-
-
-
-
Method Detail
-
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
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
public final ErrorHandler getErrorHandler()
Always return a non-null validErrorHandler
-
getMethodAnnotation
public final <A extends java.lang.annotation.Annotation> A getMethodAnnotation(java.lang.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(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.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
protected abstract java.lang.String fullName(M m)
Gets the fully-qualified name of the method. Used for error messages.
-
-