Package jodd.json

Class TypeJsonVisitor

  • Direct Known Subclasses:
    BeanSerializer

    public abstract class TypeJsonVisitor
    extends java.lang.Object
    Type's property visitor that follows JSON include/excludes rules.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void onProperty​(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor, boolean isTransient)
      Invoked on each property.
      protected abstract void onSerializableProperty​(java.lang.String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor)
      Invoked on serializable properties, that have passed all the rules.
      void visit()
      Visits a type.
      • Methods inherited from class java.lang.Object

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

      • declared

        protected final boolean declared
      • classMetadataName

        protected final java.lang.String classMetadataName
      • type

        protected final java.lang.Class type
      • count

        protected int count
      • typeData

        protected final TypeData typeData
    • Constructor Detail

      • TypeJsonVisitor

        public TypeJsonVisitor​(JsonContext jsonContext,
                               java.lang.Class type)
    • Method Detail

      • visit

        public void visit()
        Visits a type.
      • onProperty

        protected void onProperty​(java.lang.String propertyName,
                                  jodd.introspector.PropertyDescriptor propertyDescriptor,
                                  boolean isTransient)
        Invoked on each property. Properties are getting matched against the rules. If property passes all the rules, it will be processed in onSerializableProperty(String, jodd.introspector.PropertyDescriptor).
      • onSerializableProperty

        protected abstract void onSerializableProperty​(java.lang.String propertyName,
                                                       jodd.introspector.PropertyDescriptor propertyDescriptor)
        Invoked on serializable properties, that have passed all the rules. Property descriptor may be null in special case when class meta data name is used.