public interface InjectorResources
| Modifier and Type | Method and Description |
|---|---|
<A extends Annotation> |
annotatedWith(Class<A> annotation)
Create bind for parameters annotated with the specified annotation
|
default <A extends Annotation> |
annotatedWithTested(Class<A> annotation)
Create bind for parameters annotated with the specified annotation tested by the
DependencyInjectionUtils.testAnnotation(Class) method |
InjectorResources |
duplicate()
Duplicate (clone) resources
|
Annotation[][] |
fetchAnnotations(Executable executable)
Fetch annotations assigned to the given executable
|
Annotation[] |
fetchAnnotations(Parameter parameter)
Fetch annotations assigned to the given parameter
|
InjectorResources |
fork()
Create a fork of resources.
|
org.panda_lang.utilities.commons.function.Option<InjectorResourceBind<Annotation>> |
getBind(Class<?> requestedType)
Get bind for the specified type or annotation
|
Collection<org.panda_lang.utilities.inject.InjectorResourceHandler<Annotation,Object,?>> |
getHandler(Parameter parameter)
Get bind for the given parameter
|
InjectorResourceBind<?> |
on(Class<?> associatedType)
Create bind for the specified type
|
<A extends Annotation,V,R,E extends Exception> |
processAnnotated(Class<A> annotationType,
org.panda_lang.utilities.commons.function.ThrowingQuadFunction<A,InjectorProperty,V,Object[],R,E> processor)
Process injected object annotated with the given annotation
|
<A extends Annotation,V,R,E extends Exception> |
processAnnotatedType(Class<A> annotationType,
Class<V> type,
org.panda_lang.utilities.commons.function.ThrowingQuadFunction<A,InjectorProperty,V,Object[],R,E> processor)
Process injected of the given type and annotated with the given annotation
|
<V,R,E extends Exception> |
processType(Class<V> associatedType,
org.panda_lang.utilities.commons.function.ThrowingTriFunction<InjectorProperty,V,Object[],R,E> processor)
Process injected object of the given type
|
InjectorResourceBind<?> on(Class<?> associatedType)
associatedType - type to bind<A extends Annotation> InjectorResourceBind<A> annotatedWith(Class<A> annotation)
A - type of annotationannotation - the annotation to binddefault <A extends Annotation> InjectorResourceBind<A> annotatedWithTested(Class<A> annotation)
DependencyInjectionUtils.testAnnotation(Class) methodA - type of annotationannotation - the annotation to bind<V,R,E extends Exception> void processType(Class<V> associatedType, org.panda_lang.utilities.commons.function.ThrowingTriFunction<InjectorProperty,V,Object[],R,E> processor)
V - type of value to processR - return typeE - type of thrown exceptionassociatedType - type to processprocessor - the processor<A extends Annotation,V,R,E extends Exception> void processAnnotated(Class<A> annotationType, org.panda_lang.utilities.commons.function.ThrowingQuadFunction<A,InjectorProperty,V,Object[],R,E> processor)
A - type of annotation to processV - type of the injected valueR - return typeE - type of thrown exceptionannotationType - the annotation to handleprocessor - the processor<A extends Annotation,V,R,E extends Exception> void processAnnotatedType(Class<A> annotationType, Class<V> type, org.panda_lang.utilities.commons.function.ThrowingQuadFunction<A,InjectorProperty,V,Object[],R,E> processor)
A - type of annotation to processV - type of the injected valueR - return typeE - type of thrown exceptionannotationType - the annotation to handletype - the type to handleprocessor - the processorAnnotation[] fetchAnnotations(Parameter parameter)
parameter - the parameter to processAnnotation[][] fetchAnnotations(Executable executable)
executable - the executable to processCollection<org.panda_lang.utilities.inject.InjectorResourceHandler<Annotation,Object,?>> getHandler(Parameter parameter)
parameter - the parameter to get bind fororg.panda_lang.utilities.commons.function.Option<InjectorResourceBind<Annotation>> getBind(Class<?> requestedType)
requestedType - the associated class with bind to search forInjectorResources fork()
InjectorResources duplicate()
Copyright © 2021. All rights reserved.