com.sun.xml.bind.v2.model.annotation
Class AbstractInlineAnnotationReaderImpl<T,C,F,M>

java.lang.Object
  extended by 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.


Constructor Summary
AbstractInlineAnnotationReaderImpl()
           
 
Method Summary
protected abstract  java.lang.String fullName(M m)
          Gets the fully-qualified name of the method.
 ErrorHandler getErrorHandler()
          Always return a non-null valid ErrorHandler
<A extends java.lang.annotation.Annotation>
A
getMethodAnnotation(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
 

Constructor Detail

AbstractInlineAnnotationReaderImpl

public AbstractInlineAnnotationReaderImpl()
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 interface AnnotationReader<T,C,F,M>
Parameters:
errorHandler - must not be null.

getErrorHandler

public final ErrorHandler getErrorHandler()
Always return a non-null valid ErrorHandler


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 interface AnnotationReader<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 interface AnnotationReader<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.