Class AbstractJsonProcessor
- java.lang.Object
-
- jadex.transformation.jsonserializer.processors.AbstractJsonProcessor
-
- All Implemented Interfaces:
ITraverseProcessor
- Direct Known Subclasses:
JsonArrayProcessor
,JsonBeanProcessor
,JsonBigIntegerProcessor
,JsonCalendarProcessor
,JsonCertificateProcessor
,JsonClassInfoProcessor
,JsonClassProcessor
,JsonCollectionProcessor
,JsonColorProcessor
,JsonCurrencyProcessor
,JsonDateProcessor
,JsonEnumProcessor
,JsonImageProcessor
,JsonInetAddressProcessor
,JsonIteratorProcessor
,JsonJsonStringProcessor
,JsonLocalDateTimeProcessor
,JsonLoggingLevelProcessor
,JsonLogRecordProcessor
,JsonLRUProcessor
,JsonMapProcessor
,JsonMultiCollectionProcessor
,JsonOptionalProcessor
,JsonRectangleProcessor
,JsonResponseProcessor
,JsonStackTraceElementProcessor
,JsonTimestampProcessor
,JsonToStringProcessor
,JsonTupleProcessor
,JsonUUIDProcessor
public abstract class AbstractJsonProcessor extends java.lang.Object implements ITraverseProcessor
-
-
Constructor Summary
Constructors Constructor Description AbstractJsonProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
isApplicable(java.lang.Object object, java.lang.reflect.Type type, java.lang.ClassLoader targetcl, JsonReadContext context)
Test if the processor is applicable for reading.protected abstract boolean
isApplicable(java.lang.Object object, java.lang.reflect.Type type, java.lang.ClassLoader targetcl, JsonWriteContext context)
Test if the processor is applicable for writing.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 abstract java.lang.Object
readObject(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, JsonReadContext context)
Read an object.protected abstract java.lang.Object
writeObject(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, JsonWriteContext context)
Write an object.
-
-
-
Method Detail
-
isApplicable
protected abstract boolean isApplicable(java.lang.Object object, java.lang.reflect.Type type, java.lang.ClassLoader targetcl, JsonReadContext context)
Test if the processor is applicable for reading.- 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 abstract boolean isApplicable(java.lang.Object object, java.lang.reflect.Type type, java.lang.ClassLoader targetcl, JsonWriteContext context)
Test if the processor is applicable for writing.- 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 abstract java.lang.Object readObject(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, JsonReadContext context)
Read an object.- 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 abstract java.lang.Object writeObject(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, JsonWriteContext context)
Write an object.- 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.
-
isApplicable
public final 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.
-
process
public final 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.
-
-