Ableverse™
Platform 6.0

av.util
Class Cloner

java.lang.Object
  extended by av.util.Cloner

public abstract class Cloner
extends Object

As Object.clone() is defined protected, this class provides a public way to clone a various type of object.

But be aware that normally a class designed to support Cloneable will has its own public method to make clones of itself, may or may not named "clone", it even might does its own extra clone operations in this method. While this class only perform the clone operation at the Object level, which means it only copies fields of the target object. So here this class is by no means encouraging you do such dirty clone tricks, be aware of what you are doing before using this class and use it entirely at your own risk.

Author:
Compl

Method Summary
static
<T> T
clone(T src)
          Try to invoke Object.clone() upon an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clone

public static <T> T clone(T src)
               throws CloneNotSupportedException
Try to invoke Object.clone() upon an object.

Parameters:
src - the object to be cloned.
Returns:
cloned object if successed.
Throws:
CloneNotSupportedException

Ableverse™
Platform 6.0

Copyright© 2006 Ableverse Platform. All rights reserved.