public abstract class TypeSafeAnnotationHandler<T extends Annotation> extends Object implements Handler
| Constructor and Description |
|---|
TypeSafeAnnotationHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Class<T> |
getAnnotationType()
Returns the class of the annotation the handler can process.
|
Resolution<?> |
resolve(ResolutionContext context)
Resolves the context such that the object identified by the context's object identifier can be
instantiated or retrieved.
|
protected abstract Resolution<?> |
resolveValueSafely(ResolutionContext context,
T annotation)
Resolves the value with the matched annotation, guaranteed to never be null.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonAnnotation, onProvider, onProviderClass, postProcesspublic final Resolution<?> resolve(ResolutionContext context) throws Exception
Handler
The returned Resolution must correspond to the type represented by the context's object identifier.
protected abstract Class<T> getAnnotationType()
@Nullable protected abstract Resolution<?> resolveValueSafely(ResolutionContext context, T annotation) throws Exception
context - the instantiation contextannotation - the matched annotationException - for invalid usage of annotationCopyright © 2017. All rights reserved.