Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.struts.action
Class DynaActionFormClass  view DynaActionFormClass download DynaActionFormClass.java

java.lang.Object
  extended byorg.apache.struts.action.DynaActionFormClass
All Implemented Interfaces:
org.apache.commons.beanutils.DynaClass, java.io.Serializable

public class DynaActionFormClass
extends java.lang.Object
implements org.apache.commons.beanutils.DynaClass, java.io.Serializable

Implementation of DynaClass for DynaActionForm classes that allow developers to define ActionForms without having to individually code all of the classes. NOTE - This class is only used in the internal implementation of dynamic action form beans. Application developers never need to consult this documentation.

Since:
Struts 1.1
Version:
$Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected  java.lang.Class beanClass
          The DynaActionForm implementation Class which we will use to create new bean instances.
protected  org.apache.struts.config.FormBeanConfig config
          The form bean configuration information for this class.
protected  java.lang.String name
          The "dynamic class name" for this DynaClass.
protected  org.apache.commons.beanutils.DynaProperty[] properties
          The set of dynamic properties that are part of this DynaClass.
protected  java.util.HashMap propertiesMap
          The set of dynamic properties that are part of this DynaClass, keyed by the property name.
 
Constructor Summary
DynaActionFormClass(org.apache.struts.config.FormBeanConfig config)
          Construct a new DynaActionFormClass for the specified form bean configuration.
 
Method Summary
static void clear()
          Deprecated. No longer need to Clear our cache of DynaActionFormClass instances.
static DynaActionFormClass createDynaActionFormClass(org.apache.struts.config.FormBeanConfig config)
          Return the DynaActionFormClass instance for the specified form bean configuration instance.
protected  java.lang.Class getBeanClass()
          Return the implementation class we are using to construct new instances, re-introspecting our org.apache.struts.config.FormBeanConfig if necessary (that is, after being deserialized, since beanClass is marked transient).
 org.apache.commons.beanutils.DynaProperty[] getDynaProperties()
          Return an array of DynaPropertys for the properties currently defined in this DynaClass.
 org.apache.commons.beanutils.DynaProperty getDynaProperty(java.lang.String name)
          Return a property descriptor for the specified property, if it exists; otherwise, return null.
 java.lang.String getName()
          Return the name of this DynaClass (analogous to the getName() method of java.lang.ClassDynaClass implementation class to support different dynamic classes, with different sets of properties.
protected  void introspect(org.apache.struts.config.FormBeanConfig config)
          Introspect our form bean configuration to identify the supported properties.
 org.apache.commons.beanutils.DynaBean newInstance()
          Instantiate and return a new DynaActionForm instance, associated with this DynaActionFormClass.
 java.lang.String toString()
          Render a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

beanClass

protected transient java.lang.Class beanClass

The DynaActionForm implementation Class which we will use to create new bean instances.


config

protected org.apache.struts.config.FormBeanConfig config

The form bean configuration information for this class.


name

protected java.lang.String name

The "dynamic class name" for this DynaClass.


properties

protected org.apache.commons.beanutils.DynaProperty[] properties

The set of dynamic properties that are part of this DynaClass.


propertiesMap

protected java.util.HashMap propertiesMap

The set of dynamic properties that are part of this DynaClass, keyed by the property name. Individual descriptor instances will be the same instances as those in the properties list.

Constructor Detail

DynaActionFormClass

public DynaActionFormClass(org.apache.struts.config.FormBeanConfig config)

Construct a new DynaActionFormClass for the specified form bean configuration. This constructor is private; DynaActionFormClass instances will be created as needed via calls to the static createDynaActionFormClass() method.

Method Detail

getName

public java.lang.String getName()

Return the name of this DynaClass (analogous to the getName() method of java.lang.ClassDynaClass implementation class to support different dynamic classes, with different sets of properties.

Specified by:
getName in interface org.apache.commons.beanutils.DynaClass

getDynaProperty

public org.apache.commons.beanutils.DynaProperty getDynaProperty(java.lang.String name)

Return a property descriptor for the specified property, if it exists; otherwise, return null.

Specified by:
getDynaProperty in interface org.apache.commons.beanutils.DynaClass

getDynaProperties

public org.apache.commons.beanutils.DynaProperty[] getDynaProperties()

Return an array of DynaPropertys for the properties currently defined in this DynaClass. If no properties are defined, a zero-length array will be returned.

Specified by:
getDynaProperties in interface org.apache.commons.beanutils.DynaClass

newInstance

public org.apache.commons.beanutils.DynaBean newInstance()
                                                  throws java.lang.IllegalAccessException,
                                                         java.lang.InstantiationException

Instantiate and return a new DynaActionForm instance, associated with this DynaActionFormClass. The properties of the returned DynaActionForm will have been initialized to the default values specified in the form bean configuration information.

Specified by:
newInstance in interface org.apache.commons.beanutils.DynaClass

toString

public java.lang.String toString()

Render a String representation of this object.


clear

public static void clear()
Deprecated. No longer need to Clear our cache of DynaActionFormClass instances.


createDynaActionFormClass

public static DynaActionFormClass createDynaActionFormClass(org.apache.struts.config.FormBeanConfig config)
Return the DynaActionFormClass instance for the specified form bean configuration instance.


getBeanClass

protected java.lang.Class getBeanClass()

Return the implementation class we are using to construct new instances, re-introspecting our org.apache.struts.config.FormBeanConfig if necessary (that is, after being deserialized, since beanClass is marked transient).


introspect

protected void introspect(org.apache.struts.config.FormBeanConfig config)

Introspect our form bean configuration to identify the supported properties.