com.jchanghong.core.clone.CloneSupport Maven / Gradle / Ivy
The newest version!
package com.jchanghong.core.clone;
/**
* 克隆支持类,提供默认的克隆方法
* @author Looly
*
* @param 继承类的类型
*/
public class CloneSupport implements Cloneable{
@SuppressWarnings("unchecked")
@Override
public T clone() {
try {
return (T) super.clone();
} catch (CloneNotSupportedException e) {
throw new CloneRuntimeException(e);
}
}
}