public class Traverser extends Object
Constructor and Description |
---|
Traverser() |
Modifier and Type | Method and Description |
---|---|
static List<ITraverseProcessor> |
getDefaultProcessors()
Get the default traversal processors.
|
static Traverser |
getInstance()
Get the default cloner instance.
|
void |
handleDuplicate(Object object,
Class<?> clazz,
Object match,
List<ITraverseProcessor> processors,
boolean clone,
Object context)
Special handling for duplicate objects.
|
Object |
handleNull(Class<?> clazz,
List<ITraverseProcessor> processors,
boolean clone,
Object context)
Special handling for null objects.
|
Object |
traverse(Object object,
Class<?> clazz,
Map<Object,Object> traversed,
List<ITraverseProcessor> processors,
boolean clone,
ClassLoader targetcl,
Object context)
Traverse an object.
|
static Object |
traverseObject(Object object,
List<ITraverseProcessor> processors,
boolean clone,
ClassLoader targetcl,
Object context)
Traverse an object.
|
static Object |
traverseObject(Object object,
List<ITraverseProcessor> processors,
boolean clone,
Object context)
Traverse an object.
|
public static List<ITraverseProcessor> getDefaultProcessors()
public static Traverser getInstance()
public static Object traverseObject(Object object, List<ITraverseProcessor> processors, boolean clone, Object context)
object
- The object to traverse.processors
- The lists of processors.public static Object traverseObject(Object object, List<ITraverseProcessor> processors, boolean clone, ClassLoader targetcl, Object context)
object
- The object to traverse.processors
- The lists of processors.targetcl
- If not null, the traverser should make sure that the result object is compatible with the class loader,
e.g. by cloning the object using the class loaded from the target class loader.public Object traverse(Object object, Class<?> clazz, Map<Object,Object> traversed, List<ITraverseProcessor> processors, boolean clone, ClassLoader targetcl, Object context)
object
- The object.targetcl
- If not null, the traverser should make sure that the result object is compatible with the class loader,
e.g. by cloning the object using the class loaded from the target class loader.public void handleDuplicate(Object object, Class<?> clazz, Object match, List<ITraverseProcessor> processors, boolean clone, Object context)
public Object handleNull(Class<?> clazz, List<ITraverseProcessor> processors, boolean clone, Object context)
Copyright © 2013. All Rights Reserved.