com.bristle.javalib.jsp
Class InvokableMethodViaMap
java.lang.Object
java.util.AbstractMap
java.util.HashMap
com.bristle.javalib.jsp.InvokableMethodViaMap
- All Implemented Interfaces:
- Serializable, Cloneable, Map
public abstract class InvokableMethodViaMap
- extends HashMap
This abstract class supports the ability for an arbitrary one-parameter Java
method to be invoked via a JSP EL expression, by presenting the method as a
map. Subclasses must override the get() method with an implementation that
invokes the desired Java method.
Usage:
- The typical scenario for using this class is:
1. Subclass it with a class that overrides get() to call the Java method.
2. Invoke the subclass from a JSP page, as:
${myBean.myParameterValue}
${myBean[myELVariableHoldingTheParameterValue]}
Assumptions:
Effects:
- None.
Anticipated Changes:
Notes:
Implementation Notes:
- Extends HashMap, not extends AbstractMap or implements Map, so that
subclasses are required to implement only the get() method, not all
methods.
Portability Issues:
Revision History:
$Log$
- See Also:
- Serialized Form
|
Method Summary |
abstract Object |
get(Object arg0)
Overridden methods to fake a Map with all possible keys valid. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
InvokableMethodViaMap
public InvokableMethodViaMap()
get
public abstract Object get(Object arg0)
- Overridden methods to fake a Map with all possible keys valid.
- Specified by:
get in interface Map- Overrides:
get in class HashMap