public interface Handler
InjectorBuilder, so more important
handlers should come first.| Modifier and Type | Method and Description |
|---|---|
default void |
onAnnotation(Class<? extends Annotation> annotationType,
Object object)
Processes the annotation type and the associated object.
|
default <T> void |
onProvider(Class<T> clazz,
javax.inject.Provider<? extends T> provider)
Processes the given provider.
|
default <T,P extends javax.inject.Provider<? extends T>> |
onProviderClass(Class<T> clazz,
Class<P> providerClass)
Processes the given provider class.
|
default <T> T |
postProcess(T object,
ResolutionContext context,
Resolution<?> resolution)
Processes the newly created object.
|
default Resolution<?> |
resolve(ResolutionContext context)
Resolves the context such that the object identified by the context's object identifier can be
instantiated or retrieved.
|
@Nullable default Resolution<?> resolve(ResolutionContext context) throws Exception
The returned Resolution must correspond to the type represented by the context's object identifier.
context - the resolution contextnull if not possibleException - for validation errors@Nullable default <T> T postProcess(T object, ResolutionContext context, Resolution<?> resolution) throws Exception
T - the object's typeobject - the object that was instantiatedcontext - the resolution contextresolution - the resolution that was used to create the objectException - for validation errors or similardefault void onAnnotation(Class<? extends Annotation> annotationType, @Nullable Object object) throws Exception
annotationType - the annotation typeobject - the objectException - for failed validationsdefault <T> void onProvider(Class<T> clazz, javax.inject.Provider<? extends T> provider) throws Exception
T - the class' typeclazz - the class to associate the provider withprovider - the providerException - for unsuccessful validation, etc.default <T,P extends javax.inject.Provider<? extends T>> void onProviderClass(Class<T> clazz, Class<P> providerClass) throws Exception
T - the class' typeP - the provider class' typeclazz - the class to associate the provider class withproviderClass - the provider classException - for unsuccessful validation, etc.Copyright © 2017. All rights reserved.