|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.collection.lyophil.FreezableCollectionMother
This class provides a simple helper method for making FreezableCollections.
Field Summary |
Fields inherited from interface net.walend.lyophil.Mother |
BEAN, INTERFACE, PREFIX, ROLE |
Constructor Summary | |
FreezableCollectionMother()
|
Method Summary | |
Freezable |
createEvilClone(Freezable freezy,
java.lang.String role)
Create a copy as a new instance with a new identifier. |
FreezableSet |
createNewFreezableSet()
Create a new FreezableSet. |
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 FreezableCollectionMother |
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. |
FreezableSet |
restoreNewFreezableSet(java.io.Serializable id)
Create a new FreezableSet instance with an old id. |
FreezableSet |
restoreNewFreezableSet(java.io.Serializable id,
FreezableSet set)
|
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FreezableCollectionMother()
Method Detail |
public static FreezableCollectionMother getInstance()
public FreezableSet createNewFreezableSet()
CannotCreateException
- if something goes wrong.public FreezableSet restoreNewFreezableSet(java.io.Serializable id)
CannotCreateException
- if something goes wrong.public FreezableSet restoreNewFreezableSet(java.io.Serializable id, FreezableSet set)
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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |