Interface IObjectGraphVisitor


public interface IObjectGraphVisitor
Visitor callback for visiting the fields of an object via reflection.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Method Details

    • leaveClassField

      default void leaveClassField(Object fieldValue, Field field, Object container)
      Called after a class field and all its children were visited. This method is called once for each time visitClassField(Object, Field, Object) was called.
      Parameters:
      fieldValue - Value of the class field.
      field - Descriptor for the field.
      container - Container object that contains the field.
    • leaveListItem

      default void leaveListItem(Object listValue, int index, List<?> container)
      Called after a list item and all its children were visited. This method is called once for each time visitListItem(Object, int, List) was called.
      Parameters:
      listValue - Value of the list item.
      index - Index of the item in the list.
      container - List that contains the item.
    • leaveMapItem

      default void leaveMapItem(Object mapValue, Object key, Map<?,?> container)
      Called after a map item and all its children were visited. This method is called once for each time visitMapItem(Object, Object, Map) was called.
      Parameters:
      mapValue - Value of the map item.
      key - Key of the item in the map.
      container - Map that contains the item.
    • leaveSetItem

      default void leaveSetItem(Object setValue, Set<?> container)
      Called after a set item and all its children were visited. This method is called once for each time visitSetItem(Object, Set) was called.
      Parameters:
      setValue - Value of the set item.
      container - Set that contains the item.
    • visitClassField

      default EObjectGraphVisitResult visitClassField(Object fieldValue, Field field, Object container)
      Called when a class field is encountered in the object graph.
      Parameters:
      fieldValue - Value of the class field.
      field - Descriptor for the field.
      container - Container object that contains the field.
      Returns:
      How to proceed with the visit, see EObjectGraphVisitResult.
    • visitListItem

      default EObjectGraphVisitResult visitListItem(Object listValue, int index, List<?> container)
      Called when a list item is encountered in the object graph.
      Parameters:
      listValue - Value of the list item.
      index - Index of the item in the list.
      container - List that contains the item.
      Returns:
      How to proceed with the visit, see EObjectGraphVisitResult.
    • visitMapItem

      default EObjectGraphVisitResult visitMapItem(Object mapValue, Object key, Map<?,?> container)
      Called when a map item is encountered in the object graph.
      Parameters:
      mapValue - Value of the map item.
      key - Key of the item in the map.
      container - Map that contains the item.
      Returns:
      How to proceed with the visit, see EObjectGraphVisitResult.
    • visitSetItem

      default EObjectGraphVisitResult visitSetItem(Object setValue, Set<?> container)
      Called when a set item is encountered in the object graph.
      Parameters:
      setValue - Value of the set item.
      container - Set that contains the item.
      Returns:
      How to proceed with the visit, see EObjectGraphVisitResult.