Package | Description |
---|---|
org.apache.commons.betwixt |
This package contains the main betwixt introspection code.
|
org.apache.commons.betwixt.digester |
This package contains the Digester and associated rules and helper classes
for parsing the XMLBeanInfo metadata from an XML file format.
|
org.apache.commons.betwixt.io |
Package contains classes dealing directly with the reading and writing of beans.
|
org.apache.commons.betwixt.strategy |
This package contains a variety of plugin Strategy patterns that can be used to customize the
default behaviour.of the XMLIntrospector
|
Modifier and Type | Field and Description |
---|---|
private ElementDescriptor |
XMLBeanInfo.elementDescriptor
Descriptor for main element
|
private ElementDescriptor[] |
ElementDescriptor.elementDescriptors
Descriptors for child elements.
|
Modifier and Type | Method and Description |
---|---|
ElementDescriptor |
XMLBeanInfo.getElementDescriptor()
Gets descriptor for bean represention
|
ElementDescriptor[] |
ElementDescriptor.getElementDescriptors()
Returns descriptors for the child elements of the element this describes.
|
Modifier and Type | Method and Description |
---|---|
void |
ElementDescriptor.addElementDescriptor(ElementDescriptor descriptor)
Adds a descriptor for a child element.
|
void |
XMLBeanInfo.setElementDescriptor(ElementDescriptor elementDescriptor)
Sets descriptor for bean represention
|
void |
ElementDescriptor.setElementDescriptors(ElementDescriptor[] elementDescriptors)
Sets the descriptors for the child element of the element this describes.
|
Modifier and Type | Method and Description |
---|---|
protected static ElementDescriptor |
XMLIntrospectorHelper.findGetCollectionDescriptor(XMLIntrospector introspector,
ElementDescriptor rootDescriptor,
String propertyName)
Attempts to find the element descriptor for the getter property that
typically matches a collection or array.
|
protected ElementDescriptor |
AddDefaultsRule.getRootElementDescriptor()
Gets an
ElementDescriptor for the top on digester's stack. |
Modifier and Type | Method and Description |
---|---|
protected void |
ElementRule.configureDescriptor(ElementDescriptor elementDescriptor)
Set the Expression and Updater from a bean property name
|
static void |
XMLIntrospectorHelper.configureProperty(ElementDescriptor elementDescriptor,
PropertyDescriptor propertyDescriptor)
Configure an
ElementDescriptor from a PropertyDescriptor |
static void |
XMLIntrospectorHelper.defaultAddMethods(XMLIntrospector introspector,
ElementDescriptor rootDescriptor,
Class beanClass)
Add any addPropety(PropertyType) methods as Updaters
which are often used for 1-N relationships in beans.
|
protected static ElementDescriptor |
XMLIntrospectorHelper.findGetCollectionDescriptor(XMLIntrospector introspector,
ElementDescriptor rootDescriptor,
String propertyName)
Attempts to find the element descriptor for the getter property that
typically matches a collection or array.
|
protected static void |
XMLIntrospectorHelper.makeElementDescriptorMap(ElementDescriptor rootDescriptor,
Map map)
Creates a map where the keys are the property names and the values are the ElementDescriptors
|
protected static void |
XMLIntrospectorHelper.swapDescriptor(ElementDescriptor rootDescriptor,
ElementDescriptor oldValue,
ElementDescriptor newValue)
Traverse the tree of element descriptors and find the oldValue and swap it with the newValue.
|
Modifier and Type | Field and Description |
---|---|
private ElementDescriptor |
BeanCreateRule.descriptor
The descriptor of this element
|
Modifier and Type | Method and Description |
---|---|
protected ElementDescriptor |
BeanCreateRule.getElementDescriptor(ElementDescriptor propertyDescriptor)
Allows the navigation from a reference to a property object to the descriptor defining what
the property is.
|
Modifier and Type | Method and Description |
---|---|
protected void |
BeanReader.addBeanCreateRule(String path,
ElementDescriptor elementDescriptor,
Class beanClass)
Adds a new bean create rule for the specified path
|
protected void |
BeanCreateRule.addChildRules(String prefix,
ElementDescriptor currentDescriptor)
Add child rules for given descriptor at given prefix
|
protected void |
BeanCreateRule.addPrimitiveTypeRule(String path,
ElementDescriptor childDescriptor)
Adds a new Digester rule to process the text as a primitive type
|
protected ElementDescriptor |
BeanCreateRule.getElementDescriptor(ElementDescriptor propertyDescriptor)
Allows the navigation from a reference to a property object to the descriptor defining what
the property is.
|
protected void |
AbstractBeanWriter.write(String qualifiedName,
ElementDescriptor elementDescriptor,
Context context)
Writes the given element
|
protected void |
AbstractBeanWriter.write(String qualifiedName,
ElementDescriptor elementDescriptor,
Context context,
String idAttribute,
String idValue)
Writes the given element adding an ID attribute
|
protected void |
AbstractBeanWriter.writeAttributes(ElementDescriptor elementDescriptor,
Context context)
Writes the attribute declarations
|
protected boolean |
AbstractBeanWriter.writeContent(ElementDescriptor elementDescriptor,
Context context)
Writes the element content.
|
protected void |
AbstractBeanWriter.writeRestOfElement(String qualifiedName,
ElementDescriptor elementDescriptor,
Context context)
Write attributes, child elements and element end
|
Constructor and Description |
---|
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass)
Convenience constructor which uses
ID's for matching. |
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass,
boolean matchIDs)
Constructor uses standard qualified name.
|
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass,
Context context,
String pathPrefix,
boolean matchIDs)
Base constructor (used by other constructors).
|
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass,
String pathPrefix)
Convenience constructor which uses
ID's for matching. |
BeanCreateRule(ElementDescriptor descriptor,
Class beanClass,
String pathPrefix,
boolean matchIDs)
Constructor taking a class.
|
BeanCreateRule(ElementDescriptor descriptor,
Context context,
String pathPrefix)
Convenience constructor which uses
ID's for match. |
BeanCreateRule(ElementDescriptor descriptor,
Context context,
String pathPrefix,
boolean matchIDs)
Constructor taking a context.
|
Modifier and Type | Method and Description |
---|---|
ElementDescriptor |
PluralStemmer.findPluralDescriptor(String propertyName,
Map map)
Find the plural descriptor for a singular property.
|
ElementDescriptor |
DefaultPluralStemmer.findPluralDescriptor(String propertyName,
Map map)
Algorithm supports common english plural patterns.
|