Class BeanProcessor
java.lang.Object
jadex.common.transformation.traverser.BeanProcessor
- All Implemented Interfaces:
ITraverseProcessor
Processor that traverses Java beans.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IBeanIntrospector
Bean introspector for inspecting beans. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Allow adding the object to the traversed state.getReturnObject
(Object object, Class<?> clazz, ClassLoader targetcl, Object context) Get the object that is returned.boolean
isApplicable
(Object object, Type type, ClassLoader targetcl, Object context) Test if the processor is applicable.process
(Object object, Type type, Traverser traverser, List<ITraverseProcessor> conversionprocessors, List<ITraverseProcessor> processors, IStringConverter converter, Traverser.MODE mode, ClassLoader targetcl, Object context) Process an object.protected void
traverseProperties
(Object object, List<ITraverseProcessor> conversionprocessors, List<ITraverseProcessor> processors, IStringConverter converter, Traverser.MODE mode, Traverser traverser, ClassLoader targetcl, Object ret, Object context) Clone all properties of an object.
-
Field Details
-
intro
Bean introspector for inspecting beans.
-
-
Constructor Details
-
BeanProcessor
public BeanProcessor()
-
-
Method Details
-
isApplicable
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
Allow adding the object to the traversed state.- Parameters:
orig
- Original object.preprocessed
- Preprocessed object.traversed
- Traversed state.
-
process
public Object process(Object object, Type type, Traverser traverser, List<ITraverseProcessor> conversionprocessors, List<ITraverseProcessor> processors, IStringConverter converter, Traverser.MODE mode, ClassLoader targetcl, 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(Object object, List<ITraverseProcessor> conversionprocessors, List<ITraverseProcessor> processors, IStringConverter converter, Traverser.MODE mode, Traverser traverser, ClassLoader targetcl, Object ret, Object context) Clone all properties of an object. -
getReturnObject
Get the object that is returned.
-