| java.lang.Object javax.el.FunctionMapper org.apache.jasper.runtime.ProtectedFunctionMapper
ProtectedFunctionMapper | final public class ProtectedFunctionMapper extends javax.el.FunctionMapper implements FunctionMapper(Code) | | Maps EL functions to their Java method counterparts. Keeps the actual Method
objects protected so that JSP pages can't indirectly do reflection.
author: Mark Roth author: Kin-man Chung |
Method Summary | |
public static ProtectedFunctionMapper | getInstance() Generated Servlet and Tag Handler implementations call this method to
retrieve an instance of the ProtectedFunctionMapper. | public static ProtectedFunctionMapper | getMapForFunction(String fnQName, Class c, String methodName, Class[] args) Creates an instance for this class, and stores the Method for the given
EL function prefix and name. | public void | mapFunction(String fnQName, Class c, String methodName, Class[] args) Stores a mapping from the given EL function prefix and name to the given
Java method. | public Method | resolveFunction(String prefix, String localName) Resolves the specified local name and prefix into a Java.lang.Method.
Returns null if the prefix and local name are not found.
Parameters: prefix - the prefix of the function Parameters: localName - the short name of the function the result of the method mapping. |
getInstance | public static ProtectedFunctionMapper getInstance()(Code) | | Generated Servlet and Tag Handler implementations call this method to
retrieve an instance of the ProtectedFunctionMapper. This is necessary
since generated code does not have access to create instances of classes
in this package.
A new protected function mapper. |
getMapForFunction | public static ProtectedFunctionMapper getMapForFunction(String fnQName, Class c, String methodName, Class[] args)(Code) | | Creates an instance for this class, and stores the Method for the given
EL function prefix and name. This method is used for the case when there
is only one function in the EL expression.
Parameters: fnQName - The EL function qualified name (including prefix) Parameters: c - The class containing the Java method Parameters: methodName - The name of the Java method Parameters: args - The arguments of the Java method throws: RuntimeException - if no method with the given signature could be found. |
mapFunction | public void mapFunction(String fnQName, Class c, String methodName, Class[] args)(Code) | | Stores a mapping from the given EL function prefix and name to the given
Java method.
Parameters: fnQName - The EL function qualified name (including prefix) Parameters: c - The class containing the Java method Parameters: methodName - The name of the Java method Parameters: args - The arguments of the Java method throws: RuntimeException - if no method with the given signature could be found. |
resolveFunction | public Method resolveFunction(String prefix, String localName)(Code) | | Resolves the specified local name and prefix into a Java.lang.Method.
Returns null if the prefix and local name are not found.
Parameters: prefix - the prefix of the function Parameters: localName - the short name of the function the result of the method mapping. Null means no entry found. |
|
|