public abstract class SimpleBeanUtil
extends java.lang.Object
primitive
param.Constructor and Description |
---|
SimpleBeanUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
callSetter(java.lang.Object obj,
java.lang.String methodName,
java.lang.String value)
Invoke the setter method on the object.
|
public static boolean callSetter(java.lang.Object obj, java.lang.String methodName, java.lang.String value)
Uses the first match, so overloaded methods may cause unexpected behaviour. Assumes that the String
value can be
converted into its corresponding primitive value (long/double/boolean/string/float/int). If it can't a runtime exception is
probably going to be thrown.
obj
- the object.methodName
- the method name (e.g. setClientID
, case insensitive match).value
- the value; which will be converted into the appropriate primitive.