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:
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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 Details
-
leaveClassField
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
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
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
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
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
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
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
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
.
-