|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ecyrd.speed4j.util.SetterUtil
public final class SetterUtil
Provides utility method to invoke a given setter on an object while smartly parsing the given argument.
Currently supports automatic detection of integers, booleans and strings. Is smart enough to recognize the unboxed versions as well (i.e. Integers are treated equal to ints, Booleans like booleans, etc).
| Method Summary | |
|---|---|
static void |
set(Object obj,
String method,
String value)
Sets the given parameter on the object while smartly parsing the value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void set(Object obj,
String method,
String value)
throws NoSuchMethodException
The setFoo(String) method is always tried as the last resort.
obj - Object to invoke the setter onmethod - The setter (e.g. "setFoo").value - Value to set.
NoSuchMethodException - If there is no applicable method to set this value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||