All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.easyutil.project.base.bean.BaseBean Maven / Gradle / Ivy

package cn.easyutil.project.base.bean;

import cn.easyutil.util.javaUtil.ObjectUtil;

import java.io.Serializable;

/**
 * 基类
 */
public class BaseBean implements Serializable, Cloneable {
    private static final long serialVersionUID = 498226538729597654L;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    /**
     * 克隆自己
     */
    public  T cloneSelf() {
        return (T) ObjectUtil.copy(this);

//        try {
//            return (T) ObjectUtil.cloneObject(this);
//        } catch (Exception e) {
//            e.printStackTrace();
//            try {
//                return (T) clone();
//            } catch (CloneNotSupportedException e1) {
//                LoggerUtil.error(this.getClass(), "", e1);
//                return null;
//            }
//        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy