Here you can find the source of cloneCloneNotSupportedObject(final T obj, final boolean deep)
@SuppressWarnings("unchecked") protected static <T> T cloneCloneNotSupportedObject(final T obj, final boolean deep)
//package com.java2s; //License from project: Open Source License public class Main { @SuppressWarnings("unchecked") protected static <T> T cloneCloneNotSupportedObject(final T obj, final boolean deep) { if (obj instanceof String) { return obj; } else if (obj instanceof Byte) { return (T) new Byte((Byte) obj); } else if (obj instanceof Short) { return (T) new Short((Short) obj); } else if (obj instanceof Integer) { return (T) new Integer((Integer) obj); } else if (obj instanceof Long) { return (T) new Long((Long) obj); } else if (obj instanceof Float) { return (T) new Float((Float) obj); } else if (obj instanceof Double) { return (T) new Double((Double) obj); } else if (obj instanceof Boolean) { return (T) new Boolean((Boolean) obj); } else if (obj instanceof Character) { return (T) new Character((Character) obj); }/*from w w w . java 2 s.com*/ return null; } }