Beans/frank.
This commit is contained in:
@@ -203,7 +203,7 @@ public class RuntimeUtil
|
|||||||
throw new IllegalArgumentException("Cannot map " + pfield + " to " + rfield + ".");
|
throw new IllegalArgumentException("Cannot map " + pfield + " to " + rfield + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static Setter makeSetter (Class<?> pclass, Field pfield, final Field rfield)
|
protected static Setter makeSetter (Class<?> pclass, final Field pfield, Field rfield)
|
||||||
{
|
{
|
||||||
// check for a custom setter method for the field (with the correct argument type)
|
// check for a custom setter method for the field (with the correct argument type)
|
||||||
try {
|
try {
|
||||||
@@ -228,7 +228,7 @@ public class RuntimeUtil
|
|||||||
if (rfield.getType().equals(pfield.getType())) {
|
if (rfield.getType().equals(pfield.getType())) {
|
||||||
return new Setter() {
|
return new Setter() {
|
||||||
public void set (Object object, Object value) throws Exception {
|
public void set (Object object, Object value) throws Exception {
|
||||||
rfield.set(object, value);
|
pfield.set(object, value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ public class RuntimeUtil
|
|||||||
if (converter != null) {
|
if (converter != null) {
|
||||||
return new Setter() {
|
return new Setter() {
|
||||||
public void set (Object object, Object value) throws Exception {
|
public void set (Object object, Object value) throws Exception {
|
||||||
rfield.set(object, converter.apply(value));
|
pfield.set(object, converter.apply(value));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user