public final class PropertyInfoFactory
extends java.lang.Object
PropertyInfo. Using the factory methods in this class is the only way that classes outside of the oracle.ide.marshal.xml package can create instances of PropertyInfo.| Constructor and Description |
|---|
PropertyInfoFactory(java.lang.Class beanClass)
Creates a new instance of the
PropertyInfoFactory which is configured to create PropertyInfo instances related to the specified bean Class. |
| Modifier and Type | Method and Description |
|---|---|
PropertyInfo |
newAttr(java.lang.String xmlName, java.lang.String propertyName)
Creates a new
PropertyInfo which associates the XML attribute xmlName with the Java property propertyName. |
PropertyInfo |
newElem(java.lang.String xmlName, java.lang.String propertyName)
Creates a new
PropertyInfo which associates the XML element xmlName with the Java property propertyName. |
public PropertyInfoFactory(java.lang.Class beanClass)
PropertyInfoFactory which is configured to create PropertyInfo instances related to the specified bean Class.public PropertyInfo newElem(java.lang.String xmlName, java.lang.String propertyName)
PropertyInfo which associates the XML element xmlName with the Java property propertyName. The names of the getter and setter methods are derived from propertyName by simply prepending get and set to the propertyName. The case of the initial character in the property is not altered. Therefore, if the propertyName is given as Property, then this method will search for getProperty and setProperty as the accessors. Similarly, if the propertyName is property, then this method will search for getproperty and setproperty as the accessors.xmlName - The name of the XML element.propertyName - The Java property name that the getter and setter method names are to be derived from.PropertyInfo instance representing the binding of the Java property to the XML element name.public PropertyInfo newAttr(java.lang.String xmlName, java.lang.String propertyName)
PropertyInfo which associates the XML attribute xmlName with the Java property propertyName. The names of the getter and setter methods are derived from propertyName by simply prepending get and set to the propertyName. The case of the initial character in the property is not altered. Therefore, if the propertyName is given as Property, then this method will search for getProperty and setProperty as the accessors. Similarly, if the propertyName is property, then this method will search for getproperty and setproperty as the accessors.
If the type of the property as indicated by the getter method cannot be converted directly to a canonical String representation, this method will throw an IllegalArgumentException.
xmlName - The name of the XML attribute.propertyName - The Java property name that the getter and setter method names are to be derived from.PropertyInfo instance representing the binding of the Java property to the XML element name.java.lang.IllegalArgumentException - if the Java property is of a type that cannot be converted directly to a String by the ToStringManager.