org.pfsw.reflect
Class XmlReflection
java.lang.Object
org.pfsw.reflect.XmlReflection
public class XmlReflection
- extends java.lang.Object
Provides a mechanism to create Java object instances from XML meta-data
describing the objects to create.
Constructor Summary |
XmlReflection()
Initialize the new instance with default values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlReflection
public XmlReflection()
- Initialize the new instance with default values.
getAttrNameForClass
public java.lang.String getAttrNameForClass()
setAttrNameForClass
public void setAttrNameForClass(java.lang.String newValue)
getTagNameForField
public java.lang.String getTagNameForField()
setTagNameForField
public void setTagNameForField(java.lang.String newValue)
getAttrNameForFieldName
public java.lang.String getAttrNameForFieldName()
setAttrNameForFieldName
public void setAttrNameForFieldName(java.lang.String newValue)
getAttrNameForFieldValue
public java.lang.String getAttrNameForFieldValue()
setAttrNameForFieldValue
public void setAttrNameForFieldValue(java.lang.String newValue)
createInstance
public java.lang.Object createInstance(org.w3c.dom.Element xmlElement)
createInstance
public <T> T createInstance(org.w3c.dom.Element xmlElement,
java.lang.Class<T> expectedType)
createInitializedInstance
public java.lang.Object createInitializedInstance(org.w3c.dom.Element xmlElement)
throws java.lang.NoSuchFieldException
- Throws:
java.lang.NoSuchFieldException
createInitializedInstance
public <T> T createInitializedInstance(org.w3c.dom.Element xmlElement,
java.lang.Class<T> expectedType)
throws java.lang.NoSuchFieldException
- Throws:
java.lang.NoSuchFieldException
createInitializedInstances
public <T> java.util.List<T> createInitializedInstances(java.util.List<org.w3c.dom.Element> xmlElements,
java.lang.Class<T> expectedType)
throws java.lang.NoSuchFieldException
- Throws:
java.lang.NoSuchFieldException
initProperties
protected void initProperties(org.w3c.dom.Element xmlElement,
java.lang.Object object)
throws java.lang.NoSuchFieldException
- Throws:
java.lang.NoSuchFieldException
convertToType
protected java.lang.Object convertToType(java.lang.String text,
java.lang.Class type)
hasValueAttrName
protected boolean hasValueAttrName()