Package de.xima.fc.helper
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:
ObjectGraphScanner
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
leaveClassField(Object fieldValue, Field field, Object container)
Called after a class field and all its children were visited.default void
leaveListItem(Object listValue, int index, List<?> container)
Called after a list item and all its children were visited.default void
leaveMapItem(Object mapValue, Object key, Map<?,?> container)
Called after a map item and all its children were visited.default void
leaveSetItem(Object setValue, Set<?> container)
Called after a set item and all its children were visited.default EObjectGraphVisitResult
visitClassField(Object fieldValue, Field field, Object container)
Called when a class field is encountered in the object graph.default EObjectGraphVisitResult
visitListItem(Object listValue, int index, List<?> container)
Called when a list item is encountered in the object graph.default EObjectGraphVisitResult
visitMapItem(Object mapValue, Object key, Map<?,?> container)
Called when a map item is encountered in the object graph.default EObjectGraphVisitResult
visitSetItem(Object setValue, Set<?> container)
Called when a set item is encountered in the object graph.
-
-
-
Method Detail
-
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 timevisitClassField(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 timevisitListItem(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 timevisitMapItem(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 timevisitSetItem(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
.
-
-