|
SWIXML 1.5 (#149) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.swixml.TagLibrary
public abstract class TagLibrary
A skeletal impementation of a TagLibrary
A TagLibrary has a collection of Factories.
Every Tag is mapped to a Factory which is used to build the java object during document parsing.
Date: Dec 9, 2002
| Constructor Summary | |
|---|---|
TagLibrary()
Constructs a new TagLibrary and regisiters all factories. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TagLibrary()
| Method Detail |
|---|
protected abstract void registerTags()
public void registerTag(String name,
Class template)
name - String the tag's nametemplate - Class the java class that represents the tag
public 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 name
boolean 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 - String
Factory - regsitered for the given tag namepublic Factory getFactory(Class template)
template - Class
Factory - regsitered for the given tag name
protected Method getSetter(Class template,
String name)
template - Class template classname - Sting method name
Method - 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 name
Method - a setter method for the given class, able to modify the property.getSetter(Class, String),
Factory.guessSetter(String)
|
SWIXML 1.5 (#149) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||