|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.server.SignaturePartBean
public class SignaturePartBean
A bean class storing data used to construct a single parameter or return
value for a Mock Object method, or a simple Object to be bound into the
InitialContext for the current Fixture. In the case
that the "value type" of the Object to be created is a Collection or an
Array, the bean will store a list of child instances to construct each entry.
Additionally, this class stores a list of any child instances which are used
as arguments to the Constructor of a new class instance when the "value type"
of the Object to created is a new instance of a particular class, and for
which Constructor arguments have been supplied in the configuration file.
The Object to be created will be built by the
SignaturePartBuilder, which first reads the
valueType field to determine a strategy for creating the Object.
The valueClassName, value,
collectionEntries and constructorArgs fields will
then be accessed as appropriate for creating the Object (these fields are not
all required for all "value types"). The various types for the Object to be
created correspond to the values defined in the ValueType Enum,
and the valueType field of this class must match the label
defined by one of the ValueType Enum values.
The "add" and "set" methods defined in this class are invoked by the
org.apache.commons.digester.Digester when the configuration file
is parsed, and should not be called by clients.
| Constructor Summary | |
|---|---|
SignaturePartBean()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addCollectionEntry(SignaturePartBean bean)
Adds a child instance of this class to the list of entries for the Collection or Array modeled by this instance (if applicable). |
void |
addConstructorArg(SignaturePartBean bean)
Adds a child instance of this class to the list of parameters for the Class constructor (if applicable). |
void |
addObserver(ISignaturePartBeanObserver observer)
Adds an ISignaturePartBeanObserver to the list of observers. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object o)
|
void |
fireAllDataChanged()
Notifies observers of changes to the valueType, valueClassName and value fields. |
java.util.List<SignaturePartBean> |
getCollectionEntries()
Returns the list of entries for the Collection or Array modeled by this instance (if applicable). |
java.util.List<SignaturePartBean> |
getConstructorArgs()
Returns the list of arguments for the Class constructor (if applicable). |
java.lang.String |
getValue()
Returns the String used to create the value (if applicable). |
java.lang.String |
getValueClassName()
Returns the String indicating the class type name for the value (if applicable). |
ValueType |
getValueType()
Returns the ValueType for the value. |
int |
hashCode()
|
void |
removeObserver(ISignaturePartBeanObserver observer)
Removes an ISignaturePartBeanObserver from the list of
observers. |
void |
setCollection(java.lang.String collection)
Deprecated. this method does nothing, but is retained to accommodate pre-2.0 configuration files that include a "collection" element in SignaturePartBean definitions. |
void |
setCollectionEntries(java.util.List<SignaturePartBean> collectionEntries)
Sets the list of entries for the Collection or Array modeled by this instance (if applicable). |
void |
setConstructorArgs(java.util.List<SignaturePartBean> constructorArgs)
Sets the list of entries for the Collection or Array modeled by this instance (if applicable). |
void |
setValue(java.lang.String value)
Sets the String used to create the value (if applicable). |
void |
setValueClassName(java.lang.String valueClassName)
Sets the String indicating the class type name for the value (if applicable). |
void |
setValueType(ValueType type)
Sets the ValueType for the value. |
void |
setValueTypeString(java.lang.String valueType)
Sets the ValueType for the value using the supplied String
to look up the appropriate Enum value. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SignaturePartBean()
| Method Detail |
|---|
public void setValueTypeString(java.lang.String valueType)
ValueType for the value using the supplied String
to look up the appropriate Enum value. This method is called by the
org.apache.commons.digester.Digester when the configuration
data is parsed. Clients can more directly set the value with the
setType(ValueType) method. Notifies any registered
ISignaturePartBeanObserver instances.
valueType - the String indicating the ValueType for the
value.public void setValueType(ValueType type)
ValueType for the value. Notifies any registered
ISignaturePartBeanObserver instances.
type - the ValueType for the value.public ValueType getValueType()
ValueType for the value.
ValueType for the value.public void setValueClassName(java.lang.String valueClassName)
ISignaturePartBeanObserver instances.
valueClassName - the String indicating the class type name for the value (if
applicable).public java.lang.String getValueClassName()
public void setValue(java.lang.String value)
ISignaturePartBeanObserver instances.
value - the String used to create the value.public java.lang.String getValue()
public void addCollectionEntry(SignaturePartBean bean)
bean - the child instance to add to the list.public void setCollectionEntries(java.util.List<SignaturePartBean> collectionEntries)
collectionEntries - the list of entries for the Collection or Array modeled by
this instance (if applicable).public java.util.List<SignaturePartBean> getCollectionEntries()
public void addConstructorArg(SignaturePartBean bean)
bean - the child instance to add to the list.public void setConstructorArgs(java.util.List<SignaturePartBean> constructorArgs)
constructorArgs - the list of entries for the Collection or Array modeled by
this instance (if applicable).public java.util.List<SignaturePartBean> getConstructorArgs()
@Deprecated public void setCollection(java.lang.String collection)
SignaturePartBean definitions.
Collection.
collection - the String for creating a boolean for whether the value should
be wrapped in a Collection.public void addObserver(ISignaturePartBeanObserver observer)
ISignaturePartBeanObserver to the list of observers.
observer - the ISignaturePartBeanObserver to add.public void removeObserver(ISignaturePartBeanObserver observer)
ISignaturePartBeanObserver from the list of
observers.
observer - the ISignaturePartBeanObserver to remove.public void fireAllDataChanged()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||