org.apache.struts.config

Class FormPropertyConfig

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 booleanconfigured
Has this component been completely configured?
protected Stringinitial
String representation of the initial value for this property.
static Loglog
The logging instance
protected Stringname
The JavaBean property name of the property described by this element.
protected intsize

The size of the array to be created if this property is an array type and there is no specified initial value.

protected Stringtype
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
voidfreeze()
Freeze the configuration of this component.
StringgetInitial()
StringgetName()
intgetSize()
StringgetType()
ClassgetTypeClass()
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).
Objectinitial()

Return an object representing the initial value of this property.

voidsetInitial(String initial)
voidsetName(String name)
voidsetSize(int size)
voidsetType(String type)
StringtoString()
Return a String representation of this object.

Field Detail

configured

protected boolean configured
Has this component been completely configured?

initial

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

log

private static final Log log
The logging instance

name

protected 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 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(String name, String type, 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(String name, String type, 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

freeze

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

getInitial

public String getInitial()

getName

public String getName()

getSize

public int getSize()

getType

public String getType()

getTypeClass

public 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 Object initial()

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

setInitial

public void setInitial(String initial)

setName

public void setName(String name)

setSize

public void setSize(int size)

setType

public void setType(String type)

toString

public String toString()
Return a String representation of this object.
Copyright B) 2000-2008 - The Apache Software Foundation