public class Target
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Target |
ofMethodParam(MethodParam methodParam,
java.util.function.Function<java.lang.Class,java.lang.Object> valueInstanceCreator)
Creates a common target over a method param.
|
static Target |
ofMethodParam(MethodParam methodParam,
java.lang.Object object)
Creates a common target over a method param.
|
static Target |
ofValue(java.lang.Object value,
ScopeData scopeData)
Creates a common target over a value, with known scope data.
|
java.lang.Object |
readValue(InjectionPoint injectionPoint)
Reads value from the target.
|
java.lang.Object |
readValue(java.lang.String name) |
java.lang.Class |
resolveType()
Resolves target type: either using
provided type
or type of the value . |
ScopeData |
scopeData()
Returns associated scope data.
|
java.lang.Class |
type()
Returns targets type, if specified.
|
java.lang.Object |
value()
Returns target value, if specified.
|
void |
writeValue(InjectionPoint injectionPoint,
java.lang.Object propertyValue,
boolean silent)
Writes value to this target.
|
void |
writeValue(java.lang.String name,
java.lang.Object propertyValue,
boolean silent) |
public static Target ofValue(java.lang.Object value, ScopeData scopeData)
public static Target ofMethodParam(MethodParam methodParam, java.lang.Object object)
public static Target ofMethodParam(MethodParam methodParam, java.util.function.Function<java.lang.Class,java.lang.Object> valueInstanceCreator)
public java.lang.Class type()
resolveType()
public java.lang.Class resolveType()
provided type
or type of the value
.public java.lang.Object value()
public ScopeData scopeData()
public java.lang.Object readValue(InjectionPoint injectionPoint)
public java.lang.Object readValue(java.lang.String name)
public void writeValue(InjectionPoint injectionPoint, java.lang.Object propertyValue, boolean silent)
public void writeValue(java.lang.String name, java.lang.Object propertyValue, boolean silent)
Copyright © 2003-present Jodd Team