|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.betwixt.expression.MethodUpdater
public class MethodUpdater
MethodUpdater
updates the current bean context
by calling a WriteMethod with the String value from the XML attribute
or element.
Field Summary | |
---|---|
private static Log |
log
Logger |
private java.lang.reflect.Method |
method
The method to call on the bean |
private java.lang.Class |
valueType
The type of the first parameter of the method |
Constructor Summary | |
---|---|
MethodUpdater()
Base constructor |
|
MethodUpdater(java.lang.reflect.Method method)
Convenience constructor sets method property |
Method Summary | |
---|---|
java.lang.reflect.Method |
getMethod()
Gets the method which will be invoked by the update |
protected void |
handleException(Context context,
java.lang.Exception e)
Strategy method to allow derivations to handle exceptions differently. |
static void |
setLog(Log aLog)
Programmatically set log |
void |
setMethod(java.lang.reflect.Method method)
Sets the constant value of this expression |
java.lang.String |
toString()
Returns something useful for logging. |
void |
update(Context context,
java.lang.Object newValue)
Updates the current bean context with the given String value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static Log log
private java.lang.reflect.Method method
private java.lang.Class valueType
Constructor Detail |
---|
public MethodUpdater()
public MethodUpdater(java.lang.reflect.Method method)
method
- the Method to be invoked on the context's bean in the updateMethod Detail |
---|
public static void setLog(Log aLog)
aLog
- the implementation to which this class should logpublic void update(Context context, java.lang.Object newValue)
update
in interface Updater
context
- the Context to be updatednewValue
- the update to this new valuepublic java.lang.reflect.Method getMethod()
public void setMethod(java.lang.reflect.Method method)
method
- the Method to be invoked by the updateprotected void handleException(Context context, java.lang.Exception e)
context
- the Context being updated when this exception occurede
- the Exception that occured during the updatepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |