org.apache.struts.action
public class DynaActionFormClass extends Object implements DynaClass, 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 Class | beanClass The |
| protected FormBeanConfig | config The form bean configuration information for this class. |
| protected String | name The "dynamic class name" for this |
| protected DynaProperty[] | properties The set of dynamic properties that are part of this DynaClass. |
| protected HashMap | propertiesMap The set of dynamic properties that are part of this
|
| Constructor Summary | |
|---|---|
| DynaActionFormClass(FormBeanConfig config) Construct a new | |
| Method Summary | |
|---|---|
| static void | clear() |
| static DynaActionFormClass | createDynaActionFormClass(FormBeanConfig config)
Return the DynaActionFormClass instance for the specified form bean
configuration instance. |
| protected Class | getBeanClass() Return the implementation class we are using to construct new
instances, re-introspecting our FormBeanConfig if necessary
(that is, after being deserialized, since |
| DynaProperty[] | getDynaProperties() Return an array of |
| DynaProperty | getDynaProperty(String name) Return a property descriptor for the specified property, if it exists;
otherwise, return |
| String | getName() Return the name of this |
| protected void | introspect(FormBeanConfig config) Introspect our form bean configuration to identify the supported properties. |
| DynaBean | newInstance() Instantiate and return a new DynaActionForm instance,
associated with this |
| String | toString() Render a |
The DynaActionForm implementation Class
which we will use to create new bean instances.
The form bean configuration information for this class.
The "dynamic class name" for this DynaClass.
The set of dynamic properties that are part of this DynaClass.
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.
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.
Parameters: config The FormBeanConfig instance describing the properties of the bean to be created
Throws: IllegalArgumentException if the bean implementation class specified in the configuration is not DynaActionForm (or a subclass of DynaActionForm)
Deprecated: No longer need to Clear our cache of DynaActionFormClass instances.
DynaActionFormClass instance for the specified form bean
configuration instance.Return the implementation class we are using to construct new
instances, re-introspecting our FormBeanConfig if necessary
(that is, after being deserialized, since beanClass is
marked transient).
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.
Return a property descriptor for the specified property, if it exists;
otherwise, return null.
Parameters: name Name of the dynamic property for which a descriptor is requested
Throws: IllegalArgumentException if no property name is specified
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.
Introspect our form bean configuration to identify the supported properties.
Parameters: config The FormBeanConfig instance describing the properties of the bean to be created
Throws: IllegalArgumentException if the bean implementation class specified in the configuration is not DynaActionForm (or a subclass of DynaActionForm)
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.
Throws: IllegalAccessException if the Class or the appropriate constructor is not accessible InstantiationException if this Class represents an abstract class, an array class, a primitive type, or void; or if instantiation fails for some other reason
Render a String representation of this object.