Ejemplo n.º 1
0
 /**
  * Creates a Factory that will return a clone of the same prototype object
  * each time the factory is used. The prototype will be cloned using one of these
  * techniques (in order):
  * <ul>
  * <li>public clone method
  * <li>public copy constructor
  * <li>serialization clone
  * <ul>
  *
  * @see org.apache.commons.collections.functors.PrototypeFactory
  *
  * @param prototype  the object to clone each time in the factory
  * @return the <code>prototype</code> factory
  * @throws IllegalArgumentException if the prototype is null
  * @throws IllegalArgumentException if the prototype cannot be cloned
  */
 public static Factory prototypeFactory(Object prototype)
 {
     return(PrototypeFactory.getInstance(prototype));
 }