av.util
Class Cloner
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Copyright© 2006 Ableverse Platform. All rights reserved.