|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.ObjectCopier
public class ObjectCopier
Copies Objects.
Field Summary | |
---|---|
protected ClassSyntax |
syntax
|
Constructor Summary | |
---|---|
ObjectCopier()
Creates a copier that uses the default ClassSyntax. |
|
ObjectCopier(ClassSyntax syntax)
Creates a copier that uses the specified ClassSyntax as a source for ClassDescrs. |
Method Summary | |
---|---|
java.lang.Object |
copy(java.lang.Object obj)
Returns a copy of the object. |
LList |
copyLList(LList obj)
Copies an LList that has a spine made of instances of any mixture of Cons subclasses, calling mapElement(Object)
on each list element as it goes. |
static void |
main(java.lang.String[] argv)
Test loop |
java.lang.Object |
mapElement(java.lang.Object elt)
Called on subobjects of the object being copied to determine what object takes the subobject's place in the copy. |
java.lang.Object |
mapList(java.util.List obj,
ClassDescr cd)
Copies a List, calling mapElement(Object) on each
element of the list. |
java.lang.Object |
mapMap(java.util.Map obj,
ClassDescr cd)
Copies a Map, calling mapElement(Object) on each
key and value. |
java.lang.Object |
mapPrimitive(java.lang.Object obj,
ClassDescr cd)
Copies a "primitive" object. |
java.lang.Object |
mapSet(java.util.Set obj,
ClassDescr cd)
Copies a Set, calling mapElement(Object) on each
member of the set. |
java.lang.Object |
mapStruct(java.lang.Object obj,
ClassDescr cd)
Copies a structure, calling mapElement(Object) on
each field value. |
java.lang.Object |
mapXML(LiteralDocument xml,
ClassDescr cd)
Copies embedded XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ClassSyntax syntax
Constructor Detail |
---|
public ObjectCopier()
XML.config()
,
XMLConfig.defaultClassSyntax()
public ObjectCopier(ClassSyntax syntax)
Method Detail |
---|
public java.lang.Object copy(java.lang.Object obj)
mapElement(Object)
method.
public java.lang.Object mapElement(java.lang.Object elt)
copy(Object)
on the element.
public java.lang.Object mapPrimitive(java.lang.Object obj, ClassDescr cd)
mapPrimitive
in interface ObjectMapper
public java.lang.Object mapStruct(java.lang.Object obj, ClassDescr cd)
mapElement(Object)
on
each field value.
mapStruct
in interface ObjectMapper
public java.lang.Object mapXML(LiteralDocument xml, ClassDescr cd)
mapXML
in interface ObjectMapper
public java.lang.Object mapList(java.util.List obj, ClassDescr cd)
mapElement(Object)
on each
element of the list. If the list is an LList, this method calls
copyLList(LList)
to do the work.
mapList
in interface ObjectMapper
public LList copyLList(LList obj)
mapElement(Object)
on each list element as it goes.
LList
,
Cons
public java.lang.Object mapSet(java.util.Set obj, ClassDescr cd)
mapElement(Object)
on each
member of the set.
mapSet
in interface ObjectMapper
public java.lang.Object mapMap(java.util.Map obj, ClassDescr cd)
mapElement(Object)
on each
key and value.
mapMap
in interface ObjectMapper
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |