Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.xml.beans
Class IntrospectionBeanDef

java.lang.Object
  |
  +--oracle.cabo.share.xml.beans.BeanDef
        |
        +--oracle.cabo.share.xml.beans.IntrospectionBeanDef
Direct Known Subclasses:
UIBeanDef

public class IntrospectionBeanDef
extends BeanDef

Implementation of BeanDef that uses introspection to identify properties. The classes used by this must have the following properties:

  1. Required: the class must be public
  2. Required: a public, zero-arg constructor
  3. Required: public "setter" methods for each supported property.
  4. Optional: public "getter" methods for each supported property.
The methods must be named per standard JavaBean naming conventions. While getter methods are not strictly required, they are recommended as some subclasses of IntrospectionBeanDef do need to get properties after they've been set.


Constructor Summary
IntrospectionBeanDef(java.lang.String className)
          Create an IntrospectionBeanDef.
IntrospectionBeanDef(java.lang.String className, java.lang.String defaultProperty)
          Create an IntrospectionBeanDef.
 
Method Summary
protected  void addProperty(java.beans.PropertyDescriptor descriptor)
          Hook for overriding the behavior of a found property.
 java.lang.Object createBean(java.lang.String namespaceURI, java.lang.String localName)
          Creates a bean, specifying the namespace URI and localName
protected  PropertyDef createPropertyDef(java.beans.PropertyDescriptor descriptor)
          Hook for overriding the behavior of a found property.
 java.lang.Object finishBean(java.lang.Object bean)
          "Finishes" a bean by transforming it into the final target object.
 PropertyDef getDefaultPropertyDef()
          Gets the "default" property definition.
 PropertyDef getElementPropertyDef(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attrs)
          Gets an property definition for a child element.
 PropertyDef getPropertyDef(java.lang.String name)
          Gets an property definition.
 PropertyDef getPropertyDef(java.lang.String namespace, java.lang.String name)
          Gets an property definition for a namespaced property.
 boolean isInlineChildProperty(java.lang.String namespace, java.lang.String name, PropertyDef def)
          Returns true if the PropertyDef is defined with an inline child element.
protected  void loadProperties()
          Force the definition of the bean to be loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntrospectionBeanDef

public IntrospectionBeanDef(java.lang.String className)
Create an IntrospectionBeanDef.
Parameters:
className -  

IntrospectionBeanDef

public IntrospectionBeanDef(java.lang.String className,
                            java.lang.String defaultProperty)
Create an IntrospectionBeanDef.
Parameters:
className -  
Method Detail

getPropertyDef

public PropertyDef getPropertyDef(java.lang.String name)
Description copied from class: BeanDef
Gets an property definition.
Overrides:
getPropertyDef in class BeanDef
Following copied from class: oracle.cabo.share.xml.beans.BeanDef
Parameters:
name - the property name
Returns:
the property definition, or null if no such property exists

getPropertyDef

public PropertyDef getPropertyDef(java.lang.String namespace,
                                  java.lang.String name)
Description copied from class: BeanDef
Gets an property definition for a namespaced property.
Overrides:
getPropertyDef in class BeanDef
Following copied from class: oracle.cabo.share.xml.beans.BeanDef
Parameters:
namespace - the namespace
name - the property name
Returns:
the property definition, or null if no such property exists

createBean

public java.lang.Object createBean(java.lang.String namespaceURI,
                                   java.lang.String localName)
                            throws java.lang.ClassNotFoundException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Description copied from class: BeanDef
Creates a bean, specifying the namespace URI and localName
Overrides:
createBean in class BeanDef
Following copied from class: oracle.cabo.share.xml.beans.BeanDef
Parameters:
namespaceURI - the namespace URI of the bean
localName - the local name of the bean
Returns:
the new bean instance

finishBean

public java.lang.Object finishBean(java.lang.Object bean)
Description copied from class: BeanDef
"Finishes" a bean by transforming it into the final target object. This will be called when the
Overrides:
finishBean in class BeanDef
Following copied from class: oracle.cabo.share.xml.beans.BeanDef
Parameters:
bean - the bean created by createBean()
Returns:
the object that should be returned by the parser

getElementPropertyDef

public PropertyDef getElementPropertyDef(java.lang.String namespace,
                                         java.lang.String name,
                                         org.xml.sax.Attributes attrs)
Description copied from class: BeanDef
Gets an property definition for a child element.
Overrides:
getElementPropertyDef in class BeanDef
Following copied from class: oracle.cabo.share.xml.beans.BeanDef
Parameters:
namespace - the namespace
name - the property name
attrs - the XML attributes
Returns:
the property definition, or null if no such property exists

getDefaultPropertyDef

public PropertyDef getDefaultPropertyDef()
Description copied from class: BeanDef
Gets the "default" property definition.
Overrides:
getDefaultPropertyDef in class BeanDef
Following copied from class: oracle.cabo.share.xml.beans.BeanDef
Returns:
the default property definition, or null if no such property exists

isInlineChildProperty

public boolean isInlineChildProperty(java.lang.String namespace,
                                     java.lang.String name,
                                     PropertyDef def)
Description copied from class: BeanDef
Returns true if the PropertyDef is defined with an inline child element.
Overrides:
isInlineChildProperty in class BeanDef

loadProperties

protected void loadProperties()
Force the definition of the bean to be loaded. Subclasses should call this method if they override addProperty
See Also:
addProperty(java.beans.PropertyDescriptor)

addProperty

protected void addProperty(java.beans.PropertyDescriptor descriptor)
Hook for overriding the behavior of a found property. By default, the PropertyDescriptor will be created by calling createPropertyDef().

Parameters:
descriptor - the PropertyDescriptor

createPropertyDef

protected PropertyDef createPropertyDef(java.beans.PropertyDescriptor descriptor)
Hook for overriding the behavior of a found property. By default, the PropertyDescriptor will be turned directly into an IntrospectionPropertyDef, available as a non-namespaced property.

Parameters:
descriptor - the PropertyDescriptor
Returns:
the property def

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.