Class BeanSerializer


public class BeanSerializer extends TypeJsonVisitor
Bean visitor that serializes properties of a bean. It analyzes the rules for inclusion/exclusion of a property.
  • Field Details

    • source

      protected final Object source
  • Constructor Details

  • Method Details

    • serialize

      public void serialize()
      Serializes a bean.
    • onSerializableProperty

      protected final void onSerializableProperty(String propertyName, jodd.introspector.PropertyDescriptor propertyDescriptor)
      Reads property value and serializes it.
      Specified by:
      onSerializableProperty in class TypeJsonVisitor
    • onSerializableProperty

      protected void onSerializableProperty(String propertyName, Class propertyType, Object value)
      Invoked on serializable properties, that have passed all the rules. Property type is null for metadata class name property.
    • readProperty

      private Object readProperty(Object source, jodd.introspector.PropertyDescriptor propertyDescriptor)
      Reads property using property descriptor.