Class JsonRecordProcessor

java.lang.Object
jadex.transformation.jsonserializer.processors.AbstractJsonProcessor
jadex.transformation.jsonserializer.processors.JsonRecordProcessor
All Implemented Interfaces:
jadex.common.transformation.traverser.ITraverseProcessor

public class JsonRecordProcessor extends AbstractJsonProcessor
Record processor for reading json objects.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getReturnObject(Object object, Class<?> clazz, ClassLoader targetcl)
    Get the object that is returned.
    protected boolean
    isApplicable(Object object, Type type, ClassLoader targetcl, JsonReadContext context)
    Test if the processor is applicable.
    protected boolean
    isApplicable(Object object, Type type, ClassLoader targetcl, JsonWriteContext context)
    Test if the processor is applicable.
    protected Object
    readObject(Object object, Type type, jadex.common.transformation.traverser.Traverser traverser, List<jadex.common.transformation.traverser.ITraverseProcessor> conversionprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, ClassLoader targetcl, JsonReadContext context)
    Process an object.
    protected static Object[]
    readProperties(Object object, Type type, List<jadex.common.transformation.traverser.ITraverseProcessor> postprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, jadex.common.transformation.traverser.Traverser traverser, ClassLoader targetcl, JsonReadContext context)
    Clone all properties of an object.
    protected Object
    writeObject(Object object, Type type, jadex.common.transformation.traverser.Traverser traverser, List<jadex.common.transformation.traverser.ITraverseProcessor> conversionprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, ClassLoader targetcl, JsonWriteContext wr)
    Process an object.
    protected void
    writeProperties(Object object, List<jadex.common.transformation.traverser.ITraverseProcessor> conversionprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, jadex.common.transformation.traverser.Traverser traverser, ClassLoader targetcl, JsonWriteContext wr, boolean first)
    Clone all properties of an object.

    Methods inherited from class jadex.transformation.jsonserializer.processors.AbstractJsonProcessor

    isApplicable, process

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonRecordProcessor

      public JsonRecordProcessor()
  • Method Details

    • isApplicable

      protected boolean isApplicable(Object object, Type type, ClassLoader targetcl, JsonReadContext context)
      Test if the processor is applicable.
      Specified by:
      isApplicable in class AbstractJsonProcessor
      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.
    • isApplicable

      protected boolean isApplicable(Object object, Type type, ClassLoader targetcl, JsonWriteContext context)
      Test if the processor is applicable.
      Specified by:
      isApplicable in class AbstractJsonProcessor
      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.
    • readObject

      protected Object readObject(Object object, Type type, jadex.common.transformation.traverser.Traverser traverser, List<jadex.common.transformation.traverser.ITraverseProcessor> conversionprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, ClassLoader targetcl, JsonReadContext context)
      Process an object.
      Specified by:
      readObject in class AbstractJsonProcessor
      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.
    • writeObject

      protected Object writeObject(Object object, Type type, jadex.common.transformation.traverser.Traverser traverser, List<jadex.common.transformation.traverser.ITraverseProcessor> conversionprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, ClassLoader targetcl, JsonWriteContext wr)
      Process an object.
      Specified by:
      writeObject in class AbstractJsonProcessor
      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.
    • readProperties

      protected static Object[] readProperties(Object object, Type type, List<jadex.common.transformation.traverser.ITraverseProcessor> postprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, jadex.common.transformation.traverser.Traverser traverser, ClassLoader targetcl, JsonReadContext context)
      Clone all properties of an object.
    • writeProperties

      protected void writeProperties(Object object, List<jadex.common.transformation.traverser.ITraverseProcessor> conversionprocessors, List<jadex.common.transformation.traverser.ITraverseProcessor> processors, jadex.common.transformation.IStringConverter converter, jadex.common.transformation.traverser.Traverser.MODE mode, jadex.common.transformation.traverser.Traverser traverser, ClassLoader targetcl, JsonWriteContext wr, boolean first)
      Clone all properties of an object.
    • getReturnObject

      public Object getReturnObject(Object object, Class<?> clazz, ClassLoader targetcl)
      Get the object that is returned.