Package org.zkoss.xel.util
Class TaglibMapper
java.lang.Object
org.zkoss.xel.util.TaglibMapper
- All Implemented Interfaces:
Serializable,Cloneable,FunctionMapper,FunctionMapperExt
- Direct Known Subclasses:
SimpleMapper
public class TaglibMapper
extends Object
implements FunctionMapper, FunctionMapperExt, Cloneable, Serializable
A function mapper that is capable to load function and class definitions
from taglib.
- Since:
- 3.0.0, Taglib, Taglibs
- Author:
- tomyeh
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the class that can be retrieved byresolveClass(java.lang.String).voidaddFunction(String prefix, String name, Function func) Adds the function that can be retrieved byresolveFunction(java.lang.String, java.lang.String).clone()booleanReturns a readonly collection of the logic names of the class (never null).inthashCode()voidLoads function and class definitions from taglib.voidLoads function and class definitions from taglib.voidLoads function and class definitions from DOM.voidLoads function and class definitions from taglib.resolveClass(String name) Resolves a class with the specified logic name, or null if not found.resolveFunction(String prefix, String name) Resolves a functionFunctionwith the specified name and prefix.
-
Field Details
-
_mtds
Map(String prefix+":"+name, Function func). -
_clses
Map(String name, Class cls).
-
-
Constructor Details
-
TaglibMapper
public TaglibMapper()
-
-
Method Details
-
addClass
Adds the class that can be retrieved byresolveClass(java.lang.String).- Parameters:
name- the logic name of the classcls- the class to import
-
addFunction
Adds the function that can be retrieved byresolveFunction(java.lang.String, java.lang.String).- Parameters:
prefix- the prefix of the namename- the logic name of the functionfunc- the function
-
load
Loads function and class definitions from taglib.- Throws:
XelException
-
load
Loads function and class definitions from taglib. -
load
Loads function and class definitions from taglib.- Throws:
XelException
-
load
Loads function and class definitions from DOM.- Throws:
XelException
-
resolveFunction
Description copied from interface:FunctionMapperResolves a functionFunctionwith the specified name and prefix.Note: not all EL evaluator support
FunctionMapper.resolveFunction(java.lang.String, java.lang.String). Currently only JSP 2.0/2.1 EL-based expression factories support this method. You can checkExpressionFactory.isSupported(int)for this support.- Specified by:
resolveFunctionin interfaceFunctionMapper- Parameters:
prefix- the prefix of the function, or "" if no prefixname- the name of the function to resolve
-
getClassNames
Description copied from interface:FunctionMapperExtReturns a readonly collection of the logic names of the class (never null). Note: it is the name to resolve class, not the real class name. In other words, it is the logical name maintained by this function mapper.- Specified by:
getClassNamesin interfaceFunctionMapperExt
-
resolveClass
Description copied from interface:FunctionMapperExtResolves a class with the specified logic name, or null if not found.Note: not all EL evaluator support
FunctionMapperExt.resolveClass(java.lang.String). JSP 2.0/2.1 EL-based expression factories don't support this method. You can checkExpressionFactory.isSupported(int)for this support.- Specified by:
resolveClassin interfaceFunctionMapperExt- Returns:
- the class of the specified logic name.
-
clone
-
hashCode
public int hashCode() -
equals
-