net.sf.adatagenerator.api
Interface ModifiableBean<R>

Type Parameters:
T - the type of bean
All Superinterfaces:
Cloneable

public interface ModifiableBean<R>
extends Cloneable

A template for the client in a visitor pattern. This class allows one to define a chain of modifications on a bean:

 ModifiablePerson mp = ;
 List> modifiers = ;
 for (BeanModifier modifier : modifiers) {
   mp = mp.acceptModification(modifier);
 }
 


Method Summary
 ModifiableBean<R> acceptModification(BeanModifier<R> modifier)
          Accepts modification by the specified bean modifier.
 Object clone()
           
 ModifiableBean<R> cloneModifiableBean()
          A typesafe clone method
 

Method Detail

clone

Object clone()
             throws CloneNotSupportedException
Throws:
CloneNotSupportedException
See Also:
for the Cloneable contract, Object.clone()

cloneModifiableBean

ModifiableBean<R> cloneModifiableBean()
                                      throws CreationException
A typesafe clone method

Throws:
CreationException

acceptModification

ModifiableBean<R> acceptModification(BeanModifier<R> modifier)
                                     throws ModificationException
Accepts modification by the specified bean modifier.

Returns:
a modified version (or copy) of this instance.
Throws:
ModificationException


Copyright © 2011-2012. All Rights Reserved.