|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.lyophil.test.stringbean.FreezableStringMother
This class provides a simple helper method for making FreezableStrings.
Field Summary | |
private static int |
counter
|
Fields inherited from interface net.walend.lyophil.Mother |
BEAN, INTERFACE, PREFIX, ROLE |
Constructor Summary | |
FreezableStringMother()
|
Method Summary | |
Freezable |
createEvilClone(Freezable freezy,
java.lang.String role)
Create a copy as a new instance with a new identifier. |
FreezableColorString |
createNewFreezableColorString(java.lang.String string,
java.lang.String color)
|
FreezableColorString |
createNewFreezableColorString(java.lang.String string,
java.lang.String typableKey,
java.lang.String color)
Create a new FreezableString. |
FreezableString |
createNewFreezableString(java.lang.String string)
|
FreezableString |
createNewFreezableString(java.lang.String string,
java.lang.String typableKey)
Create a new FreezableString. |
FreezableString |
createNewFreezableString(TestString ts)
|
Freezable |
createNewInstance(java.lang.String role)
Create a new instance of a class for the given role wanted. |
Freezable |
createNewInstance(java.lang.String role,
java.lang.Object[] parameters)
Create a new instance of a class for the given role wanted. |
static FreezableStringMother |
getInstance()
|
java.lang.Class |
getInterfaceForBeanClass(java.lang.Class beanClass)
|
java.lang.Class |
getInterfaceForRole(java.lang.String role)
|
Set |
getInterfaces()
|
protected Mother |
getMother()
|
java.lang.String |
getRoleForInterface(java.lang.Class interf)
|
void |
postCreate(Freezable freezable,
Mother caller)
Mothers should call this method after creating a new instance of a Freezable. |
FreezableColorString |
restoreNewFreezableColorString(java.io.Serializable id,
java.lang.String string,
java.lang.String color,
java.lang.String typableKey)
Create a new FreezableString instance with an old id. |
FreezableString |
restoreNewFreezableString(java.io.Serializable id,
java.lang.String string,
java.lang.String typableKey)
Create a new FreezableString instance with an old id. |
Freezable |
restoreNewInstance(java.lang.String role,
java.io.Serializable id)
Only call this method from inside a Freezer. |
Freezable |
restoreNewInstance(java.lang.String role,
java.io.Serializable id,
java.lang.Object[] parameters)
Only call this method from inside a Freezer. |
private static java.lang.String |
uniqueString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static int counter
Constructor Detail |
public FreezableStringMother()
Method Detail |
public static FreezableStringMother getInstance()
public FreezableString createNewFreezableString(java.lang.String string, java.lang.String typableKey)
CannotCreateException
- if something goes wrong.public FreezableString createNewFreezableString(java.lang.String string)
public FreezableString createNewFreezableString(TestString ts)
public FreezableString restoreNewFreezableString(java.io.Serializable id, java.lang.String string, java.lang.String typableKey)
CannotCreateException
- if something goes wrong.public FreezableColorString createNewFreezableColorString(java.lang.String string, java.lang.String typableKey, java.lang.String color)
CannotCreateException
- if something goes wrong.public FreezableColorString createNewFreezableColorString(java.lang.String string, java.lang.String color)
public FreezableColorString restoreNewFreezableColorString(java.io.Serializable id, java.lang.String string, java.lang.String color, java.lang.String typableKey)
CannotCreateException
- if something goes wrong.protected Mother getMother()
public Set getInterfaces()
getInterfaces
in interface Mother
public java.lang.Class getInterfaceForRole(java.lang.String role)
getInterfaceForRole
in interface Mother
public java.lang.String getRoleForInterface(java.lang.Class interf)
getRoleForInterface
in interface Mother
public java.lang.Class getInterfaceForBeanClass(java.lang.Class beanClass)
getInterfaceForBeanClass
in interface Mother
public void postCreate(Freezable freezable, Mother caller)
Mother
postCreate
in interface Mother
public Freezable createNewInstance(java.lang.String role)
Mother
implementations should call postCreate(new freezable,this);
createNewInstance
in interface Mother
net.walend.lyophil.Mother
role
- the role that the Freezable should implementpublic Freezable createNewInstance(java.lang.String role, java.lang.Object[] parameters)
Mother
implementations should call postCreate(new freezable,this);
createNewInstance
in interface Mother
net.walend.lyophil.Mother
role
- the role that the Freezable should implementparameters
- for the object's constructor.public Freezable createEvilClone(Freezable freezy, java.lang.String role)
Mother
implementations should call postCreate(new freezable,this);
createEvilClone
in interface Mother
net.walend.lyophil.Mother
freezy
- the Freezable to copy.public Freezable restoreNewInstance(java.lang.String role, java.io.Serializable id)
Mother
restoreNewInstance
in interface Mother
net.walend.lyophil.Mother
role
- the role that the Freezable should implementpublic Freezable restoreNewInstance(java.lang.String role, java.io.Serializable id, java.lang.Object[] parameters)
Mother
restoreNewInstance
in interface Mother
net.walend.lyophil.Mother
role
- the role that the Freezable should implementid
- the identifier of this Freezableparameters
- for the object's constructor.private static java.lang.String uniqueString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |