|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.xel.util.TaglibMapper
public class TaglibMapper
A function mapper that is capable to load function and class definitions from taglib.
| Field Summary | |
|---|---|
protected Map |
_clses
Map(String name, Class cls). |
protected Map |
_mtds
Map(String prefix+":"+name, Function func). |
| Constructor Summary | |
|---|---|
TaglibMapper()
|
|
| Method Summary | |
|---|---|
void |
addClass(String name,
Class cls)
Adds the class that can be retrieved by resolveClass(java.lang.String). |
void |
addFunction(String prefix,
String name,
Function func)
Adds the function that can be retrieved by resolveFunction(java.lang.String, java.lang.String). |
Object |
clone()
|
boolean |
equals(Object o)
|
Collection |
getClassNames()
Returns a readonly collection of the logic names of the class (never null). |
int |
hashCode()
|
void |
load(String prefix,
Element root)
Loads function and class definitions from DOM. |
void |
load(String prefix,
String uri,
Locator locator)
Loads function and class definitions from taglib. |
void |
load(String prefix,
URL url)
Loads function and class definitions from taglib. |
void |
load(Taglib taglib,
Locator locator)
Loads function and class definitions from taglib. |
Class |
resolveClass(String name)
Resolves a class with the specified logic name, or null if not found. |
Function |
resolveFunction(String prefix,
String name)
Resolves a function Function with the specified name and
prefix. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map _mtds
protected Map _clses
| Constructor Detail |
|---|
public TaglibMapper()
| Method Detail |
|---|
public void addClass(String name,
Class cls)
resolveClass(java.lang.String).
name - the logic name of the classcls - the class to import
public void addFunction(String prefix,
String name,
Function func)
resolveFunction(java.lang.String, java.lang.String).
prefix - the prefix of the namename - the logic name of the functionfunc - the function
public void load(String prefix,
URL url)
throws XelException
XelException
public void load(Taglib taglib,
Locator locator)
public void load(String prefix,
String uri,
Locator locator)
throws XelException
XelException
public void load(String prefix,
Element root)
throws XelException
XelException
public Function resolveFunction(String prefix,
String name)
FunctionMapperFunction with 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 check ExpressionFactory.isSupported(int) for this
support.
resolveFunction in interface FunctionMapperprefix - the prefix of the function, or "" if no prefixname - the name of the function to resolvepublic Collection getClassNames()
FunctionMapper
getClassNames in interface FunctionMapperpublic Class resolveClass(String name)
FunctionMapperNote: not all EL evaluator support FunctionMapper.resolveClass(java.lang.String).
JSP 2.0/2.1 EL-based expression factories don't support
this method.
You can check ExpressionFactory.isSupported(int) for this
support.
resolveClass in interface FunctionMapperpublic Object clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||