java.lang.Object | |
↳ | org.apache.commons.betwixt.digester.XMLIntrospectorHelper |
This class is deprecated.
No replacement.
XMLIntrospectorHelper
a helper class for
common code shared between the digestor and introspector.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
log | Log used for logging (Doh!) |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Base constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
0.6 moved into AttributeRule
| |||||||||||
This method is deprecated.
0.6 moved into ElementRule
| |||||||||||
This method is deprecated.
0.6 unused
| |||||||||||
This method is deprecated.
0.5 this method has been replaced by
createDescriptor(PropertyDescriptor, boolean)
| |||||||||||
This method is deprecated.
0.6 use the method in XMLIntrospector instead
| |||||||||||
Gets the current logging implementation. | |||||||||||
This method is deprecated.
0.7 replaced by
isLoopType(Class)
| |||||||||||
This method is deprecated.
0.6 replaced by
TypeBindingStrategy
| |||||||||||
Sets the current logging implementation. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
0.6 moved into XMLIntrospector
| |||||||||||
This method is deprecated.
0.6 moved into XMLIntrospector
| |||||||||||
This method is deprecated.
0.6 now unused
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Log used for logging (Doh!)
Base constructor
This method is deprecated.
0.6 moved into AttributeRule
Configure an AttributeDescriptor
from a PropertyDescriptor
attributeDescriptor | configure this AttributeDescriptor |
---|---|
propertyDescriptor | configure from this PropertyDescriptor |
This method is deprecated.
0.6 moved into ElementRule
Configure an ElementDescriptor
from a PropertyDescriptor
.
A custom update method may be set.
elementDescriptor | configure this ElementDescriptor |
---|---|
propertyDescriptor | configure from this PropertyDescriptor |
updateMethodName | the name of the custom updater method to user. If null, then then |
beanClass | the Class from which the update method should be found.
This may be null only when updateMethodName is also null. |
This method is deprecated.
0.6 unused
Configure an ElementDescriptor
from a PropertyDescriptor
.
This uses default element updater (the write method of the property).
elementDescriptor | configure this ElementDescriptor |
---|---|
propertyDescriptor | configure from this PropertyDescriptor |
This method is deprecated.
0.5 this method has been replaced by createDescriptor(PropertyDescriptor, boolean)
Process a property. Go through and work out whether it's a loop property, a primitive or a standard. The class property is ignored.
propertyDescriptor | create a NodeDescriptor for this property |
---|---|
useAttributesForPrimitives | write primitives as attributes (rather than elements) |
introspector | use this XMLIntrospector |
NodeDescriptor
for the propertyIntrospectionException | when bean introspection fails |
---|
This method is deprecated.
0.6 use the method in XMLIntrospector instead
Add any addPropety(PropertyType) methods as Updaters
which are often used for 1-N relationships in beans.
The tricky part here is finding which ElementDescriptor corresponds
to the method. e.g. a property 'items' might have an Element descriptor
which the method addItem() should match to.
So the algorithm we'll use
by default is to take the decapitalized name of the property being added
and find the first ElementDescriptor that matches the property starting with
the string. This should work for most use cases.
e.g. addChild() would match the children property.
introspector | use this XMLIntrospector for introspection |
---|---|
rootDescriptor | add defaults to this descriptor |
beanClass | the Class to which descriptor corresponds |
Gets the current logging implementation.
This method is deprecated.
0.7 replaced by isLoopType(Class)
Is this a loop type class?
type | is this Class a loop type? |
---|
This method is deprecated.
0.6 replaced by TypeBindingStrategy
Is this a primitive type? TODO: this method will probably be removed when primitive types are subsumed into the simple type concept. This needs moving into XMLIntrospector so that the list of simple type can be varied.
type | is this Class |
---|
Sets the current logging implementation.
aLog | use this Log
|
---|
This method is deprecated.
0.6 moved into XMLIntrospector
Attempts to find the element descriptor for the getter property that typically matches a collection or array. The property name is used to match. e.g. if an addChild() method is detected the descriptor for the 'children' getter property should be returned.
introspector | use this XMLIntrospector |
---|---|
rootDescriptor | the ElementDescriptor whose child element will be
searched for a match |
propertyName | the name of the 'adder' method to match |
ElementDescriptor
for the matching getter
This method is deprecated.
0.6 moved into XMLIntrospector
Creates a map where the keys are the property names and the values are the ElementDescriptors
rootDescriptor | the values of the maps are the children of this
ElementDescriptor index by their property names |
---|---|
map | the map to which the elements will be added |
This method is deprecated.
0.6 now unused
Traverse the tree of element descriptors and find the oldValue and swap it with the newValue. This would be much easier to do if ElementDescriptor supported a parent relationship.
rootDescriptor | traverse child graph for this ElementDescriptor |
---|---|
oldValue | replace this ElementDescriptor |
newValue | replace with this ElementDescriptor |