public EntityType getClone() { EntityType newObj = new EntityType(); for (Field f : this.getClass().getDeclaredFields()) { try { f.set(newObj, clone(getFieldValue(f.getName()))); } catch (Exception e) { e.printStackTrace(); } } return newObj; }
public EntityType getClone() { EntityType newObj = new EntityType(); for (Field f : this.getClass().getDeclaredFields()) { try { f.set(newObj, clone(getFieldValue(f.getName()))); } catch (Exception e) { e.printStackTrace(); } } return newObj; }