org.apache.commons.proxy.provider
Class CloningProvider

java.lang.Object
  extended by org.apache.commons.proxy.provider.CloningProvider
All Implemented Interfaces:
ObjectProvider

public class CloningProvider
extends Object
implements ObjectProvider

Merely calls clone() (reflectively) on the given Cloneable object.

Since:
1.0
Author:
James Carman

Constructor Summary
CloningProvider(Cloneable cloneable)
          Constructs a provider which returns clone copies of the specified Cloneable object.
 
Method Summary
 Object getObject()
          Returns an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloningProvider

public CloningProvider(Cloneable cloneable)
Constructs a provider which returns clone copies of the specified Cloneable object.

Parameters:
cloneable - the object to clone
Method Detail

getObject

public Object getObject()
Description copied from interface: ObjectProvider
Returns an object. Implementing classes should throw a ObjectProviderException if any problems arise while constructing/finding the object.

Specified by:
getObject in interface ObjectProvider
Returns:
the object on which the method should be called


Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.