Your preferences have been saved!
» Object Deep copy - import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; public final class ObjectUtil {     private ObjectUtil() {     }     @SuppressWarnings("unchecked")     public static <T> T deepCopy(T obj) {         try {... 17 Feb 12 » Deep-copies the values from one object to the other - import java.lang.reflect.Field; import java.util.Random; /**  * I can't think of anywhere else to put them  *   * @author ryanm  */ public class Util {   /**... 17 Feb 12 » Returns a copy of the object, or null if the - //package wekinator.util; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; /**  *  * http://javatechniques.com/blog/faster-deep-copies-of-java-objects/  */... 17 Feb 12 » This program demonstrates cloning - import java.util.Date; import java.util.GregorianCalendar; /**  * This program demonstrates cloning.  * @version 1.10 2002-07-01  * @author Cay Horstmann  */ public class CloneTest {    public static void main(String[] args)... 17 Feb 12 » A collection of utilities to workaround limitations of Java clone - import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; /**  * A collection of utilities to workaround limitations of Java clone framework.  */ public class CloneUtils {     public static Object clone(final Object obj) throws CloneNotSupportedException {         if (obj == null) {             return null;         }... 17 Feb 12 » Implements a pool of internalized objects - import java.lang.ref.Reference; import java.lang.ref.WeakReference; import java.util.AbstractCollection; import java.util.Collections; import java.util.Iterator; import java.util.Map; import java.util.WeakHashMap; /**  * Implements a pool of <dfn>internalized</dfn> objects.  * Used to implement pools that behave like the one used by String.intern().... 17 Feb 12 » Deep clone serializing/de-serializng Clone - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; /**  * Utility for object cloning  *   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>  */ public class CloneUtil... 17 Feb 12 » Clone demo - class One extends java.lang.Object {   int x; } class Two extends One /*implements Cloneable*/ {   int y;   public void foo() {     try {       Object o = this.clone();     } catch (CloneNotSupportedException ex) {       System.err.println(ex);... 17 Feb 12 » Clone Via Serialization - import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException;... 17 Feb 12 » Utility for object cloning - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; /**  * Utility for object cloning  *   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>  */ public class CloneUtil... 17 Feb 12