public interface Bind<A extends Annotation> extends Comparable<Bind<A>>
| Modifier and Type | Method and Description |
|---|---|
void |
assignHandler(org.panda_lang.utilities.commons.function.TriFunction<Property,A,Object[],?> handler)
Assign custom handler to the bind
|
void |
assignInstance(Object value)
Assign object to the bind
|
void |
assignInstance(Supplier<?> valueSupplier)
Assign value supplier to the bind
|
default int |
compareTo(@NotNull Bind bind) |
Class<?> |
getAssociatedType()
Get associated type with the bind
|
Class<?> |
getDataType()
Get data type
|
Object |
getValue(Property required,
A annotation,
Object... injectorArgs)
Get value of bind for the required (parameter) type and instance of bind type
|
void assignInstance(Object value)
value - the instance to assignvoid assignInstance(Supplier<?> valueSupplier)
valueSupplier - the supplier to assignvoid assignHandler(org.panda_lang.utilities.commons.function.TriFunction<Property,A,Object[],?> handler)
handler - the handler which accepts type of parameter and bind type as argumentsObject getValue(Property required, A annotation, Object... injectorArgs) throws Exception
required - the required return typeannotation - instance of bind generic typeinjectorArgs - custom arguments for injectorException - if anything wrong will happen, whole process should be stoppedClass<?> getAssociatedType()
Class<?> getDataType()
default int compareTo(@NotNull
@NotNull Bind bind)
compareTo in interface Comparable<Bind<A extends Annotation>>Copyright © 2021. All rights reserved.