Package org.eclipse.jgit.revwalk
Interface ObjectWalk.VisitationPolicy
- All Known Implementing Classes:
PackWriter.DepthAwareVisitationPolicy
- Enclosing class:
- ObjectWalk
public static interface ObjectWalk.VisitationPolicy
When walking over a tree and blob graph, objects are usually marked as
seen as they are visited and this "seen" status is checked upon the next
visit. If they are already "seen" then they are not processed (returned
by
ObjectWalk.nextObject()
) again. However, this behavior can be
overridden by supplying a different implementation of this class.- Since:
- 5.4
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whenever the rev or object walk reaches a Git object, if that object already exists as a RevObject, this method is called to determine if that object should be visited.void
Called when an object is visited.
-
Method Details
-
shouldVisit
Whenever the rev or object walk reaches a Git object, if that object already exists as a RevObject, this method is called to determine if that object should be visited.- Parameters:
o
- the object to check if it should be visited- Returns:
- true if the object should be visited
-
visited
Called when an object is visited.- Parameters:
o
- the object that was visited
-