Class 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.
      • Methods inherited from class java.lang.Object

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

      • AbstractJsonProcessor

        public AbstractJsonProcessor()
    • 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 interface ITraverseProcessor
        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 interface ITraverseProcessor
        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.