public abstract class TagLibrary extends Object
| Constructor and Description |
|---|
TagLibrary()
Constructs a new TagLibrary and regisiters all factories.
|
| Modifier and Type | Method and Description |
|---|---|
Factory |
getFactory(Class template)
Returns the Factory that is currently registered for the given Tag name
|
Factory |
getFactory(String name)
Returns the Factory that is currently registered for the given Tag name
|
protected Method |
getSetter(Class template,
String name)
Returns a setter method by name for a specified template class
|
Map |
getTagClasses() |
protected Method |
guessSetter(Class template,
String name)
Returns a setter method by name for a specified template class
|
void |
registerTag(String name,
Class template)
Registers a class for the given tag name
|
void |
registerTag(String name,
Factory factory)
Registers a factory for the given tag name
|
protected abstract void |
registerTags()
Registers all factories for the TagLibrary.
|
boolean |
unregisterTag(String name)
Un-registers (removes) a registered tag.
|
public TagLibrary()
protected abstract void registerTags()
public void registerTag(String name, Class template)
name - String the tag's nametemplate - Class the java class that represents the tagpublic void registerTag(String name, Factory factory)
name - String the tag's namefactory - FactoryFactory factory to create an Instance of the tagpublic boolean unregisterTag(String name)
name - String the tag's nameboolean true if tag was registered befoire and now successfuly removed.public Map getTagClasses()
Map - all registered tags.
Use athe tag names to get to the factories
public Factory getFactory(String name)
name - StringFactory - regsitered for the given tag namepublic Factory getFactory(Class template)
template - ClassFactory - regsitered for the given tag nameprotected Method getSetter(Class template, String name)
template - Class template classname - Sting method nameMethod - a setter method for the given class.guessSetter(Class, String),
Factory.getSetter(String)protected Method guessSetter(Class template, String name)
template - Class template classname - Sting attribute nameMethod - a setter method for the given class, able to modify the property.getSetter(Class, String),
Factory.guessSetter(String)Copyright (c) 2002 - 2015 - Wolf Paulus - wolfpaulus.com. All rights reserved.