public class MethodUpdater extends Object implements Updater
MethodUpdater
updates the current bean context
by calling a WriteMethod with the String value from the XML attribute
or element.
Modifier and Type | Field and Description |
---|---|
private static Log |
log
Logger
|
private Method |
method
The method to call on the bean
|
private Class |
valueType
The type of the first parameter of the method
|
Constructor and Description |
---|
MethodUpdater()
Base constructor
|
MethodUpdater(Method method)
Convenience constructor sets method property
|
Modifier and Type | Method and Description |
---|---|
Method |
getMethod()
Gets the method which will be invoked by the update
|
protected void |
handleException(Context context,
Exception e)
Strategy method to allow derivations to handle exceptions differently.
|
static void |
setLog(Log aLog)
Programmatically set log
|
void |
setMethod(Method method)
Sets the constant value of this expression
|
String |
toString()
Returns something useful for logging.
|
void |
update(Context context,
Object newValue)
Updates the current bean context with the given String value
|
private static Log log
private Method method
private Class valueType
public MethodUpdater()
public MethodUpdater(Method method)
method
- the Method to be invoked on the context's bean in the updatepublic static void setLog(Log aLog)
aLog
- the implementation to which this class should logpublic void update(Context context, Object newValue)
public Method getMethod()
public void setMethod(Method method)
method
- the Method to be invoked by the updateprotected void handleException(Context context, Exception e)
context
- the Context being updated when this exception occurede
- the Exception that occured during the update