org.apache.commons.jelly.tags.betwixt
Class IntrospectorTag
java.lang.Object
|
+--org.apache.commons.jelly.TagSupport
|
+--org.apache.commons.jelly.tags.betwixt.IntrospectorTag
- All Implemented Interfaces:
- Tag
- public class IntrospectorTag
- extends TagSupport
Creates a Betwixt XMLIntrospector instance that can be used by the other Betwixt tags.
- Version:
- $Revision: 1.7 $
- Author:
- James Strachan
Method Summary |
protected org.apache.commons.betwixt.XMLIntrospector |
createIntrospector()
Factory method to create a new XMLIntrospector |
protected static org.apache.commons.betwixt.strategy.NameMapper |
createNameMapper(java.lang.String name)
Static helper method which will convert the given string into
standard named strategies such as 'lowercase', 'uppercase' or 'hyphenated'
or use the name as a class name and create a new instance. |
void |
doTag(XMLOutput output)
Evaluates this tag after all the tags properties have been initialized. |
org.apache.commons.betwixt.XMLIntrospector |
getIntrospector()
|
void |
setAttributeNameMapper(org.apache.commons.betwixt.strategy.NameMapper nameMapper)
Sets the name mapper used for attribute names. |
void |
setAttributesForPrimitives(boolean attributesForPrimitives)
Sets whether attributes or elements should be used for primitive types. |
void |
setElementNameMapper(org.apache.commons.betwixt.strategy.NameMapper nameMapper)
Sets the name mapper used for element names. |
void |
setVar(java.lang.String var)
Sets the variable name to output the new XMLIntrospector to. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntrospectorTag
public IntrospectorTag()
doTag
public void doTag(XMLOutput output)
throws java.lang.Exception
- Description copied from interface:
Tag
- Evaluates this tag after all the tags properties have been initialized.
getIntrospector
public org.apache.commons.betwixt.XMLIntrospector getIntrospector()
- Returns:
- the current XMLIntrospector, lazily creating one if required
setAttributesForPrimitives
public void setAttributesForPrimitives(boolean attributesForPrimitives)
- Sets whether attributes or elements should be used for primitive types.
The default is false.
setElementNameMapper
public void setElementNameMapper(org.apache.commons.betwixt.strategy.NameMapper nameMapper)
- Sets the name mapper used for element names.
You can also use the Strings 'lowercase', 'uppercase' or 'hyphenated'
as aliases to the common name mapping strategies or specify a class name String.
setAttributeNameMapper
public void setAttributeNameMapper(org.apache.commons.betwixt.strategy.NameMapper nameMapper)
- Sets the name mapper used for attribute names.
You can also use the Strings 'lowercase', 'uppercase' or 'hyphenated'
as aliases to the common name mapping strategies or specify a class name String.
setVar
public void setVar(java.lang.String var)
- Sets the variable name to output the new XMLIntrospector to.
If this attribute is not specified then this tag must be nested
inside an <parse> or <output> tag
createNameMapper
protected static org.apache.commons.betwixt.strategy.NameMapper createNameMapper(java.lang.String name)
- Static helper method which will convert the given string into
standard named strategies such as 'lowercase', 'uppercase' or 'hyphenated'
or use the name as a class name and create a new instance.
createIntrospector
protected org.apache.commons.betwixt.XMLIntrospector createIntrospector()
- Factory method to create a new XMLIntrospector
Copyright © 2002-2002 Apache Software Foundation. All Rights Reserved.