|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.betwixt.digester.XMLIntrospectorHelper
public class XMLIntrospectorHelper
XMLIntrospectorHelper
a helper class for
common code shared between the digestor and introspector.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
Deprecated. Log used for logging (Doh!) |
Constructor Summary | |
---|---|
XMLIntrospectorHelper()
Deprecated. Base constructor |
Method Summary | |
---|---|
static void |
configureProperty(AttributeDescriptor attributeDescriptor,
java.beans.PropertyDescriptor propertyDescriptor)
Deprecated. 0.6 moved into AttributeRule |
static void |
configureProperty(ElementDescriptor elementDescriptor,
java.beans.PropertyDescriptor propertyDescriptor)
Deprecated. 0.6 unused |
static void |
configureProperty(ElementDescriptor elementDescriptor,
java.beans.PropertyDescriptor propertyDescriptor,
java.lang.String updateMethodName,
java.lang.Class beanClass)
Deprecated. 0.6 moved into ElementRule |
static NodeDescriptor |
createDescriptor(java.beans.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,
java.lang.Class beanClass)
Deprecated. 0.6 use the method in XMLIntrospector instead |
protected static ElementDescriptor |
findGetCollectionDescriptor(XMLIntrospector introspector,
ElementDescriptor rootDescriptor,
java.lang.String propertyName)
Deprecated. 0.6 moved into XMLIntrospector |
static org.apache.commons.logging.Log |
getLog()
Deprecated. Gets the current logging implementation. |
static boolean |
isLoopType(java.lang.Class type)
Deprecated. 0.7 replaced by IntrospectionConfiguration.isLoopType(Class) |
static boolean |
isPrimitiveType(java.lang.Class type)
Deprecated. 0.6 replaced by TypeBindingStrategy |
protected static void |
makeElementDescriptorMap(ElementDescriptor rootDescriptor,
java.util.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public XMLIntrospectorHelper()
Method Detail |
---|
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 Log
public static NodeDescriptor createDescriptor(java.beans.PropertyDescriptor propertyDescriptor, boolean useAttributesForPrimitives, XMLIntrospector introspector) throws java.beans.IntrospectionException
XMLIntrospector.createDescriptor(java.beans.PropertyDescriptor, boolean)
propertyDescriptor
- create a NodeDescriptor
for this propertyuseAttributesForPrimitives
- write primitives as attributes (rather than elements)introspector
- use this XMLIntrospector
NodeDescriptor
for the property
java.beans.IntrospectionException
- when bean introspection failspublic static void configureProperty(ElementDescriptor elementDescriptor, java.beans.PropertyDescriptor propertyDescriptor)
ElementDescriptor
from a PropertyDescriptor
.
This uses default element updater (the write method of the property).
elementDescriptor
- configure this ElementDescriptor
propertyDescriptor
- configure from this PropertyDescriptor
public static void configureProperty(ElementDescriptor elementDescriptor, java.beans.PropertyDescriptor propertyDescriptor, java.lang.String updateMethodName, java.lang.Class beanClass)
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 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, java.beans.PropertyDescriptor propertyDescriptor)
AttributeDescriptor
from a PropertyDescriptor
attributeDescriptor
- configure this AttributeDescriptor
propertyDescriptor
- configure from this PropertyDescriptor
public static void defaultAddMethods(XMLIntrospector introspector, ElementDescriptor rootDescriptor, java.lang.Class beanClass)
introspector
- use this XMLIntrospector
for introspectionrootDescriptor
- add defaults to this descriptorbeanClass
- the Class
to which descriptor correspondspublic static boolean isLoopType(java.lang.Class type)
IntrospectionConfiguration.isLoopType(Class)
type
- is this Class
a loop type?
public static boolean isPrimitiveType(java.lang.Class type)
TypeBindingStrategy
type
- is this Class a primitive type?
- Returns:
- true for primitive types
protected static ElementDescriptor findGetCollectionDescriptor(XMLIntrospector introspector, ElementDescriptor rootDescriptor, java.lang.String propertyName)
introspector
- use this XMLIntrospector
rootDescriptor
- the ElementDescriptor
whose child element will be
searched for a matchpropertyName
- the name of the 'adder' method to match
ElementDescriptor
for the matching getterprotected static void makeElementDescriptorMap(ElementDescriptor rootDescriptor, java.util.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 ElementDescriptor
oldValue
- replace this ElementDescriptor
newValue
- replace with this ElementDescriptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |