Class BeanProcessor
- java.lang.Object
-
- jadex.commons.transformation.traverser.BeanProcessor
-
- All Implemented Interfaces:
ITraverseProcessor
public class BeanProcessor extends java.lang.Object implements ITraverseProcessor
Processor that traverses Java beans.
-
-
Field Summary
Fields Modifier and Type Field Description protected IBeanIntrospector
intro
Bean introspector for inspecting beans.
-
Constructor Summary
Constructors Constructor Description BeanProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToTraversedState(java.lang.Object orig, java.lang.Object preprocessed, java.util.Map<java.lang.Object,java.lang.Object> traversed)
Allow adding the object to the traversed state.java.lang.Object
getReturnObject(java.lang.Object object, java.lang.Class<?> clazz, java.lang.ClassLoader targetcl, java.lang.Object context)
Get the object that is returned.boolean
isApplicable(java.lang.Object object, java.lang.reflect.Type type, java.lang.ClassLoader targetcl, java.lang.Object context)
Test if the processor is applicable.java.lang.Object
process(java.lang.Object object, java.lang.reflect.Type type, Traverser traverser, java.util.List<ITraverseProcessor> conversionprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, java.lang.ClassLoader targetcl, java.lang.Object context)
Process an object.protected void
traverseProperties(java.lang.Object object, java.util.List<ITraverseProcessor> conversionprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, Traverser traverser, java.lang.ClassLoader targetcl, java.lang.Object ret, java.lang.Object context)
Clone all properties of an object.
-
-
-
Field Detail
-
intro
protected IBeanIntrospector intro
Bean introspector for inspecting beans.
-
-
Method Detail
-
isApplicable
public boolean isApplicable(java.lang.Object object, java.lang.reflect.Type type, java.lang.ClassLoader targetcl, java.lang.Object context)
Test if the processor is applicable.- Specified by:
isApplicable
in interfaceITraverseProcessor
- Parameters:
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.- Returns:
- True, if is applicable.
-
addToTraversedState
public void addToTraversedState(java.lang.Object orig, java.lang.Object preprocessed, java.util.Map<java.lang.Object,java.lang.Object> traversed)
Allow adding the object to the traversed state.- Parameters:
orig
- Original object.preprocessed
- Preprocessed object.traversed
- Traversed state.
-
process
public java.lang.Object process(java.lang.Object object, java.lang.reflect.Type type, Traverser traverser, java.util.List<ITraverseProcessor> conversionprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, java.lang.ClassLoader targetcl, java.lang.Object context)
Process an object.- Specified by:
process
in interfaceITraverseProcessor
- Parameters:
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.- Returns:
- The processed object.
-
traverseProperties
protected void traverseProperties(java.lang.Object object, java.util.List<ITraverseProcessor> conversionprocessors, java.util.List<ITraverseProcessor> processors, Traverser.MODE mode, Traverser traverser, java.lang.ClassLoader targetcl, java.lang.Object ret, java.lang.Object context)
Clone all properties of an object.
-
getReturnObject
public java.lang.Object getReturnObject(java.lang.Object object, java.lang.Class<?> clazz, java.lang.ClassLoader targetcl, java.lang.Object context)
Get the object that is returned.
-
-