|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.betwixt.expression.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 org.apache.commons.logging.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 Summary | |
MethodUpdater()
Base constructor |
|
MethodUpdater(Method method)
Convenience constructor sets method property |
Method Summary | |
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(org.apache.commons.logging.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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static org.apache.commons.logging.Log log
private Method method
private Class valueType
Constructor Detail |
public MethodUpdater()
public MethodUpdater(Method method)
method
- the Method to be invoked on the context's bean in the updateMethod Detail |
public static void setLog(org.apache.commons.logging.Log aLog)
aLog
- the implementation to which this class should logpublic void update(Context context, Object newValue)
update
in interface Updater
context
- the Context to be updatednewValue
- the update to this new valuepublic 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 updatepublic String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |