public class XMLIntrospectorHelper extends Object
XMLIntrospectorHelper a helper class for
common code shared between the digestor and introspector.
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log
Deprecated.
Log used for logging (Doh!)
|
| Constructor and Description |
|---|
XMLIntrospectorHelper()
Deprecated.
Base constructor
|
| Modifier and Type | Method and Description |
|---|---|
static void |
configureProperty(AttributeDescriptor attributeDescriptor,
PropertyDescriptor propertyDescriptor)
Deprecated.
0.6 moved into AttributeRule
|
static void |
configureProperty(ElementDescriptor elementDescriptor,
PropertyDescriptor propertyDescriptor)
Deprecated.
0.6 unused
|
static void |
configureProperty(ElementDescriptor elementDescriptor,
PropertyDescriptor propertyDescriptor,
String updateMethodName,
Class beanClass)
Deprecated.
0.6 moved into ElementRule
|
static NodeDescriptor |
createDescriptor(PropertyDescriptor propertyDescriptor,
boolean useAttributesForPrimitives,
XMLIntrospector introspector)
Deprecated.
0.5 this method has been replaced by
XMLIntrospector.createDescriptor(java.beans.PropertyDescriptor, boolean) |
static void |
defaultAddMethods(XMLIntrospector introspector,
ElementDescriptor rootDescriptor,
Class beanClass)
Deprecated.
0.6 use the method in XMLIntrospector instead
|
protected static ElementDescriptor |
findGetCollectionDescriptor(XMLIntrospector introspector,
ElementDescriptor rootDescriptor,
String propertyName)
Deprecated.
0.6 moved into XMLIntrospector
|
static org.apache.commons.logging.Log |
getLog()
Deprecated.
Gets the current logging implementation.
|
static boolean |
isLoopType(Class type)
Deprecated.
0.7 replaced by
IntrospectionConfiguration.isLoopType(Class) |
static boolean |
isPrimitiveType(Class type)
Deprecated.
0.6 replaced by
TypeBindingStrategy |
protected static void |
makeElementDescriptorMap(ElementDescriptor rootDescriptor,
Map map)
Deprecated.
0.6 moved into XMLIntrospector
|
static void |
setLog(org.apache.commons.logging.Log aLog)
Deprecated.
Sets the current logging implementation.
|
protected static void |
swapDescriptor(ElementDescriptor rootDescriptor,
ElementDescriptor oldValue,
ElementDescriptor newValue)
Deprecated.
0.6 now unused
|
protected static org.apache.commons.logging.Log log
public XMLIntrospectorHelper()
public static org.apache.commons.logging.Log getLog()
Gets the current logging implementation.
public static void setLog(org.apache.commons.logging.Log aLog)
Sets the current logging implementation.
aLog - use this Logpublic static NodeDescriptor createDescriptor(PropertyDescriptor propertyDescriptor, boolean useAttributesForPrimitives, XMLIntrospector introspector) throws IntrospectionException
XMLIntrospector.createDescriptor(java.beans.PropertyDescriptor, boolean)propertyDescriptor - create a NodeDescriptor for this propertyuseAttributesForPrimitives - write primitives as attributes (rather than elements)introspector - use this XMLIntrospectorNodeDescriptor for the propertyIntrospectionException - when bean introspection failspublic static void configureProperty(ElementDescriptor elementDescriptor, PropertyDescriptor propertyDescriptor)
ElementDescriptor from a PropertyDescriptor.
This uses default element updater (the write method of the property).elementDescriptor - configure this ElementDescriptorpropertyDescriptor - configure from this PropertyDescriptorpublic static void configureProperty(ElementDescriptor elementDescriptor, PropertyDescriptor propertyDescriptor, String updateMethodName, Class beanClass)
ElementDescriptor from a PropertyDescriptor.
A custom update method may be set.elementDescriptor - configure this ElementDescriptorpropertyDescriptor - configure from this PropertyDescriptorupdateMethodName - the name of the custom updater method to user.
If null, then thenbeanClass - the Class from which the update method should be found.
This may be null only when updateMethodName is also null.public static void configureProperty(AttributeDescriptor attributeDescriptor, PropertyDescriptor propertyDescriptor)
AttributeDescriptor from a PropertyDescriptorattributeDescriptor - configure this AttributeDescriptorpropertyDescriptor - configure from this PropertyDescriptorpublic static void defaultAddMethods(XMLIntrospector introspector, ElementDescriptor rootDescriptor, Class beanClass)
introspector - use this XMLIntrospector for introspectionrootDescriptor - add defaults to this descriptorbeanClass - the Class to which descriptor correspondspublic static boolean isLoopType(Class type)
IntrospectionConfiguration.isLoopType(Class)type - is this Class a loop type?public static boolean isPrimitiveType(Class type)
TypeBindingStrategytype - is this Class a primitive type?protected static ElementDescriptor findGetCollectionDescriptor(XMLIntrospector introspector, ElementDescriptor rootDescriptor, String propertyName)
introspector - use this XMLIntrospectorrootDescriptor - the ElementDescriptor whose child element will be
searched for a matchpropertyName - the name of the 'adder' method to matchElementDescriptor for the matching getterprotected static void makeElementDescriptorMap(ElementDescriptor rootDescriptor, Map map)
rootDescriptor - the values of the maps are the children of this
ElementDescriptor index by their property namesmap - the map to which the elements will be addedprotected static void swapDescriptor(ElementDescriptor rootDescriptor, ElementDescriptor oldValue, ElementDescriptor newValue)
rootDescriptor - traverse child graph for this ElementDescriptoroldValue - replace this ElementDescriptornewValue - replace with this ElementDescriptorCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.