Changes between Version 13 and Version 14 of PRO_LIB_UTILS_R0
- Timestamp:
- 12/10/08 15:22:11 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PRO_LIB_UTILS_R0
v13 v14 25 25 26 26 = Design = 27 !ProUtil should provide functionality for "smart" copying of properties. "Smart" means that depending on specific objects a person can expect only the reference to the object to be copied or to change a little the copy to identify it as a copy or can expect a "deep" copy (means copy not only the object, but also objects used inside). So "smart" copy should follow some expected behaviour. What the common behavior is depends not only on object type but also on its connection to other objects and their mutability i.e. whether it is in a parent-child relation or whether points to an object that is mutable or immutable or automatic. 28 27 29 * Assign - public static <T extends !ProObject> void assign(T dest, T source) 28 30 The assign() method should copy the values of all properties of the source !ProObject to the destionation !ProObject. It should be a "smart" copy, so for each property should be decided how to be copied. … … 39 41 ||property types||relation/annotation||value class||value action||comment|| 40 42 41 ||!ValueProperty ||@ own ||immutable ||error ||||43 ||!ValueProperty ||@Own ||immutable ||error |||| 42 44 || || ||pro-obj ||pro.clone |||| 43 45 || || ||else ||error |||| 44 || ||@ shared||all ||copy ref ||||46 || ||@Shared||all ||copy ref |||| 45 47 || ||none ||immutable ||copy ref |||| 46 48 || || ||else ||error |||| … … 60 62 61 63 * Tests 62 org.sophie2.core.prolib.util.!ProUtilTest 64 [http://10.10.117.11:8000/sophie2/browser/trunk/sophie2-platform/modules/org.sophie2.core/src/test/java/org/sophie2/core/prolib/util/ProUtilTest.java?rev=728] 63 65 64 66 = Implementation =