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:
- org.apache.commons.jelly.Tag
- public class IntrospectorTag
- extends org.apache.commons.jelly.TagSupport
Creates a Betwixt XMLIntrospector instance that can be used by the other Betwixt tags.
- Version:
- $Revision: 1.7 $
- Author:
- James Strachan
Fields inherited from class org.apache.commons.jelly.TagSupport |
body, context, hasTrimmed, parent, shouldTrim |
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(org.apache.commons.jelly.XMLOutput output)
|
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, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, 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(org.apache.commons.jelly.XMLOutput output)
throws org.apache.commons.jelly.MissingAttributeException,
org.apache.commons.jelly.JellyTagException
- Overrides:
doTag
in class org.apache.commons.jelly.TagSupport
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-2004 Apache Software Foundation. All Rights Reserved.