@Test public void testClone() throws Exception { Object clone = defaultCloneProcess.clone(def1); testPropertySet(clone, def1, nameProperty2, nameValue); }
@Override public <S, T> T clone(S source, T target) { final DefinitionAdapter<Object> definitionAdapter = adapterManager.forDefinition(); final String namePropertyField = definitionAdapter.getMetaPropertyField(source, PropertyMetaTypes.NAME); final String targetNamePropertyField = definitionAdapter.getMetaPropertyField(target, PropertyMetaTypes.NAME); final Object nameProperty = definitionAdapter.getProperty(source, namePropertyField).get(); final Object targetNameProperty = definitionAdapter.getProperty(target, targetNamePropertyField).get(); final Object namePropertyValue = adapterManager.forProperty().getValue(nameProperty); adapterManager.forProperty().setValue(targetNameProperty, namePropertyValue); return target; }
DefaultCloneProcess extends AbstractCloneProcess { @Override public <S, T> T clone(S source, T target) { final DefinitionAdapter<Object> definitionAdapter = adapterManager.forDefinition(); final String namePropertyField = definitionAdapter.getMetaPropertyField(source, PropertyMetaTypes.NAME); final String targetNamePropertyField = definitionAdapter.getMetaPropertyField(target, PropertyMetaTypes.NAME); final Object nameProperty = definitionAdapter.getProperty(source, namePropertyField).get(); final Object targetNameProperty = definitionAdapter.getProperty(target, targetNamePropertyField).get(); final Object namePropertyValue = adapterManager.forProperty().getValue(nameProperty); adapterManager.forProperty().setValue(targetNameProperty, namePropertyValue); return target; } }
DefaultCloneProcess extends AbstractCloneProcess { @Override public <S, T> T clone(S source, T target) { final DefinitionAdapter<Object> definitionAdapter = adapterManager.forDefinition(); final String namePropertyField = definitionAdapter.getMetaPropertyField(source, PropertyMetaTypes.NAME); final String targetNamePropertyField = definitionAdapter.getMetaPropertyField(target, PropertyMetaTypes.NAME); final Object nameProperty = definitionAdapter.getProperty(source, namePropertyField).get(); final Object targetNameProperty = definitionAdapter.getProperty(target, targetNamePropertyField).get(); final Object namePropertyValue = adapterManager.forProperty().getValue(nameProperty); adapterManager.forProperty().setValue(targetNameProperty, namePropertyValue); return target; } DefaultCloneProcess(); @Inject  DefaultCloneProcess(FactoryManager factoryManager, AdapterManager adapterManager); }
DefaultCloneProcess extends AbstractCloneProcess { @Override public <S, T> T clone(S source, T target) { final DefinitionAdapter<Object> definitionAdapter = adapterManager.forDefinition(); final String namePropertyField = definitionAdapter.getMetaPropertyField(source, PropertyMetaTypes.NAME); final String targetNamePropertyField = definitionAdapter.getMetaPropertyField(target, PropertyMetaTypes.NAME); final Object nameProperty = definitionAdapter.getProperty(source, namePropertyField).get(); final Object targetNameProperty = definitionAdapter.getProperty(target, targetNamePropertyField).get(); final Object namePropertyValue = adapterManager.forProperty().getValue(nameProperty); adapterManager.forProperty().setValue(targetNameProperty, namePropertyValue); return target; } DefaultCloneProcess(); @Inject  DefaultCloneProcess(FactoryManager factoryManager, AdapterManager adapterManager); @Override T clone(S source, T target); }
DefaultCloneProcess extends AbstractCloneProcess { @Override public <S, T> T clone(S source, T target) { final DefinitionAdapter<Object> definitionAdapter = adapterManager.forDefinition(); final String namePropertyField = definitionAdapter.getMetaPropertyField(source, PropertyMetaTypes.NAME); final String targetNamePropertyField = definitionAdapter.getMetaPropertyField(target, PropertyMetaTypes.NAME); final Object nameProperty = definitionAdapter.getProperty(source, namePropertyField).get(); final Object targetNameProperty = definitionAdapter.getProperty(target, targetNamePropertyField).get(); final Object namePropertyValue = adapterManager.forProperty().getValue(nameProperty); adapterManager.forProperty().setValue(targetNameProperty, namePropertyValue); return target; } DefaultCloneProcess(); @Inject  DefaultCloneProcess(FactoryManager factoryManager, AdapterManager adapterManager); @Override T clone(S source, T target);  }