public class BeanProcessor extends java.lang.Object implements ITraverseProcessor
Modifier and Type | Field and Description |
---|---|
protected IBeanIntrospector |
intro
Bean introspector for inspecting beans.
|
Constructor and Description |
---|
BeanProcessor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getReturnObject(java.lang.Object object,
java.lang.Class<?> clazz,
boolean clone,
java.lang.ClassLoader targetcl)
Get the object that is returned.
|
boolean |
isApplicable(java.lang.Object object,
java.lang.reflect.Type type,
boolean clone,
java.lang.ClassLoader targetcl)
Test if the processor is applicable.
|
java.lang.Object |
process(java.lang.Object object,
java.lang.reflect.Type type,
java.util.List<ITraverseProcessor> processors,
Traverser traverser,
java.util.Map<java.lang.Object,java.lang.Object> traversed,
boolean clone,
java.lang.ClassLoader targetcl,
java.lang.Object context)
Process an object.
|
protected void |
traverseProperties(java.lang.Object object,
java.util.Map<java.lang.Object,java.lang.Object> cloned,
java.util.List<ITraverseProcessor> processors,
Traverser traverser,
boolean clone,
java.lang.ClassLoader targetcl,
java.lang.Object ret,
java.lang.Object context)
Clone all properties of an object.
|
protected IBeanIntrospector intro
public boolean isApplicable(java.lang.Object object, java.lang.reflect.Type type, boolean clone, java.lang.ClassLoader targetcl)
isApplicable
in interface ITraverseProcessor
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 java.lang.Object process(java.lang.Object object, java.lang.reflect.Type type, java.util.List<ITraverseProcessor> processors, Traverser traverser, java.util.Map<java.lang.Object,java.lang.Object> traversed, boolean clone, java.lang.ClassLoader targetcl, java.lang.Object context)
process
in interface ITraverseProcessor
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.protected void traverseProperties(java.lang.Object object, java.util.Map<java.lang.Object,java.lang.Object> cloned, java.util.List<ITraverseProcessor> processors, Traverser traverser, boolean clone, java.lang.ClassLoader targetcl, java.lang.Object ret, java.lang.Object context)
public java.lang.Object getReturnObject(java.lang.Object object, java.lang.Class<?> clazz, boolean clone, java.lang.ClassLoader targetcl)