public final class ReflectionMutatorSetter<VAL,TARGET> extends Object implements PropertySetter<VAL,TARGET>
| Modifier and Type | Method and Description |
|---|---|
static <V,T> ReflectionMutatorSetter<V,T> |
forOptionalProperty(String propName)
Creates a
ReflectionMutatorSetter with optional values, ie the ReflectionMutatorSetter shall
discard any null value. |
static <V,T> ReflectionMutatorSetter<V,T> |
forProperty(String propName,
Class<V> paramType)
Creates a
ReflectionMutatorSetter with mandatory values, ie the ReflectionMutatorSetter shall try
to set any given value. |
void |
set(VAL value,
TARGET target) |
public static <V,T> ReflectionMutatorSetter<V,T> forProperty(@NotNull String propName, Class<V> paramType)
ReflectionMutatorSetter with mandatory values, ie the ReflectionMutatorSetter shall try
to set any given value. As the value to be set can be null, we cannot infer its type, hence the
paramType param.propName - name of the field.paramType - type of the mutator formal parampublic static <V,T> ReflectionMutatorSetter<V,T> forOptionalProperty(@NotNull String propName)
ReflectionMutatorSetter with optional values, ie the ReflectionMutatorSetter shall
discard any null value.propName - public void set(VAL value, TARGET target)
set in interface PropertySetter<VAL,TARGET>PropertySetter.set(java.lang.Object, java.lang.Object)Copyright © 2010–2017 Henix, henix.fr. All rights reserved.