org.apache.struts.config
Class FormPropertyConfig

java.lang.Object
  |
  +--org.apache.struts.config.FormPropertyConfig
All Implemented Interfaces:
java.io.Serializable

public class FormPropertyConfig
extends java.lang.Object
implements java.io.Serializable

A JavaBean representing the configuration information of a <form-property> element in a Struts configuration file.

Since:
Struts 1.1
Version:
$Revision: 1.1 $ $Date$
Author:
Craig R. McClanahan
See Also:
Serialized Form

Field Summary
protected  boolean configured
          Has this component been completely configured?
protected  java.lang.String initial
          String representation of the initial value for this property.
protected  java.lang.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 initial value.
protected  java.lang.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(java.lang.String name, java.lang.String type, java.lang.String initial)
          Constructor that preconfigures the relevant properties.
FormPropertyConfig(java.lang.String name, java.lang.String type, java.lang.String initial, int size)
          Constructor that preconfigures the relevant properties.
 
Method Summary
 void freeze()
          Freeze the configuration of this component.
 java.lang.String getInitial()
           
 java.lang.String getName()
           
 int getSize()
           
 java.lang.String getType()
           
 java.lang.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).
 java.lang.Object initial()
          Return an object representing the initial value of this property.
 void setInitial(java.lang.String initial)
           
 void setName(java.lang.String name)
           
 void setSize(int size)
           
 void setType(java.lang.String type)
           
 java.lang.String toString()
          Return 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

configured

protected boolean configured
Has this component been completely configured?


initial

protected java.lang.String initial
String representation of the initial value for this property.


name

protected java.lang.String name
The JavaBean property name of the property described by this element.


size

protected int size

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

type

protected java.lang.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 Detail

FormPropertyConfig

public FormPropertyConfig()
Standard no-arguments constructor for dynamic instantiation.


FormPropertyConfig

public FormPropertyConfig(java.lang.String name,
                          java.lang.String type,
                          java.lang.String initial)
Constructor that preconfigures the relevant properties.

Parameters:
name - Name of this property
type - Fully qualified class name of this property
initial - Initial value of this property (if any)

FormPropertyConfig

public FormPropertyConfig(java.lang.String name,
                          java.lang.String type,
                          java.lang.String initial,
                          int size)
Constructor that preconfigures the relevant properties.

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
Method Detail

getInitial

public java.lang.String getInitial()

setInitial

public void setInitial(java.lang.String initial)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getSize

public int getSize()

setSize

public void setSize(int size)

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

getTypeClass

public java.lang.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).


initial

public java.lang.Object initial()

Return an object representing the initial value of this property. This is calculated according to the following algorithm:


freeze

public void freeze()
Freeze the configuration of this component.


toString

public java.lang.String toString()
Return a String representation of this object.

Overrides:
toString in class java.lang.Object


Copyright © 2000-2003 - Apache Software Foundation