Package jodd.json

Class TypeJsonVisitor

java.lang.Object
jodd.json.TypeJsonVisitor
Direct Known Subclasses:
BeanSerializer

public abstract class TypeJsonVisitor extends Object
Type's property visitor that follows JSON include/excludes rules.
  • Field Details

    • jsonContext

      protected final JsonContext jsonContext
    • declared

      protected final boolean declared
    • classMetadataName

      protected final String classMetadataName
    • type

      protected final Class type
    • count

      protected int count
    • typeData

      protected final TypeData typeData
  • Constructor Details

    • TypeJsonVisitor

      public TypeJsonVisitor(JsonContext jsonContext, Class type)
  • Method Details

    • visit

      public void visit()
      Visits a type.
    • onProperty

      protected void onProperty(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(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.