Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.marshal.xml
Class PropertyInfoFactory

java.lang.Object
  extended by oracle.javatools.marshal.xml.PropertyInfoFactory


public final class PropertyInfoFactory
extends java.lang.Object

This is a factory class used to create instances of 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 Summary
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.

 

Method Summary
 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.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

PropertyInfoFactory

public 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.

Method Detail

newElem

public 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. 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.
Parameters:
xmlName - The name of the XML element.
propertyName - The Java property name that the getter and setter method names are to be derived from.
Returns:
A PropertyInfo instance representing the binding of the Java property to the XML element name.

newAttr

public 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. 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.

Parameters:
xmlName - The name of the XML attribute.
propertyName - The Java property name that the getter and setter method names are to be derived from.
Returns:
A PropertyInfo instance representing the binding of the Java property to the XML element name.
Throws:
java.lang.IllegalArgumentException - if the Java property is of a type that cannot be converted directly to a String by the ToStringManager.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.