org.apache.struts.config
public class FormPropertyConfig extends Object implements Serializable
A JavaBean representing the configuration information of a
<form-property>
element in a Struts
configuration file.
Since: Struts 1.1
Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
Field Summary | |
---|---|
protected boolean | configured
Has this component been completely configured? |
protected String | initial
String representation of the initial value for this property. |
static Log | log
The logging instance |
protected String | name
The JavaBean property name of the property described by this element. |
protected int | size The size of the array to be created if this property is an array
type and there is no specified |
protected String | type
The fully qualified Java class name of the implementation class
of this bean property, optionally followed by [] to
indicate that the property is indexed. |
Constructor Summary | |
---|---|
FormPropertyConfig()
Standard no-arguments constructor for dynamic instantiation. | |
FormPropertyConfig(String name, String type, String initial)
Constructor that preconfigures the relevant properties.
| |
FormPropertyConfig(String name, String type, String initial, int size)
Constructor that preconfigures the relevant properties.
|
Method Summary | |
---|---|
void | freeze()
Freeze the configuration of this component. |
String | getInitial() |
String | getName() |
int | getSize() |
String | getType() |
Class | getTypeClass()
Return a Class corresponds to the value specified for the
type property, taking into account the trailing "[]"
for arrays (as well as the ability to specify primitive Java types). |
Object | initial() Return an object representing the initial value of this property. |
void | setInitial(String initial) |
void | setName(String name) |
void | setSize(int size) |
void | setType(String type) |
String | toString()
Return a String representation of this object. |
The size of the array to be created if this property is an array
type and there is no specified initial
value. This
value must be non-negative.
Since: Struts 1.1
[]
to
indicate that the property is indexed.Parameters: name Name of this property type Fully qualified class name of this property initial Initial value of this property (if any)
Parameters: name Name of this property type Fully qualified class name of this property initial Initial value of this property (if any) size Size of the array to be created if this property is an array with no defined initial value
type
property, taking into account the trailing "[]"
for arrays (as well as the ability to specify primitive Java types).Return an object representing the initial value of this property. This is calculated according to the following algorithm:
type
property represents an array (i.e. it ends with "[]"):
initial
property, ConvertUtils.convert
will be
called to convert it into an instance of the specified
array type.initial
property, an array of the length specified by the
size
property will be created. Each element
of the array will be instantiated via the zero-args constructor
on the specified class (if any). Otherwise, null
will be returned.type
property does not represent an array:
initial
property, ConvertUtils.convert
will be called to convert it into an object instance.initial
attribute, Struts will instantiate an instance via the
zero-args constructor on the specified class (if any).
Otherwise, null
will be returned.