Package org.eclipse.jgit.revwalk
Class Generator
java.lang.Object
org.eclipse.jgit.revwalk.Generator
- Direct Known Subclasses:
AbstractRevQueue
,BoundaryGenerator
,BoundaryGenerator.InitialGenerator
,DelayRevQueue
,DepthGenerator
,EndGenerator
,FixUninterestingGenerator
,MergeBaseGenerator
,PendingGenerator
,RewriteGenerator
,StartGenerator
,TopoNonIntermixSortGenerator
,TopoSortGenerator
Produces commits for RevWalk to return to applications.
Implementations of this basic class provide the real work behind RevWalk. Conceptually a Generator is an iterator or a queue, it returns commits until there are no more relevant. Generators may be piped/stacked together to create a more complex set of operations.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
(package private) static final int
Output may haveRevWalk.REWRITE
marked on it.(package private) static final int
Output may haveRevWalk.UNINTERESTING
marked on it.(package private) static final int
Output needsRewriteGenerator
.(package private) static final int
Commits are sorted by commit date and time, descending.(package private) static final int
Topological ordering is enforced (all children before parents). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract RevCommit
next()
Return the next commit to the application, or the next generator.(package private) abstract int
Obtain flags describing the output behavior of this generator.(package private) void
Connect the supplied queue to this generator's own free list (if any).
-
Field Details
-
SORT_COMMIT_TIME_DESC
static final int SORT_COMMIT_TIME_DESCCommits are sorted by commit date and time, descending.- See Also:
-
HAS_REWRITE
static final int HAS_REWRITEOutput may haveRevWalk.REWRITE
marked on it.- See Also:
-
NEEDS_REWRITE
static final int NEEDS_REWRITEOutput needsRewriteGenerator
.- See Also:
-
SORT_TOPO
static final int SORT_TOPOTopological ordering is enforced (all children before parents).- See Also:
-
HAS_UNINTERESTING
static final int HAS_UNINTERESTINGOutput may haveRevWalk.UNINTERESTING
marked on it.- See Also:
-
firstParent
protected final boolean firstParent
-
-
Constructor Details
-
Generator
protected Generator(boolean firstParent)
-
-
Method Details
-
outputType
abstract int outputType()Obtain flags describing the output behavior of this generator.- Returns:
- one or more of the constants declared in this class, describing how this generator produces its results.
-
next
Return the next commit to the application, or the next generator.- Returns:
- next available commit; null if no more are to be returned.
- Throws:
MissingObjectException
IncorrectObjectTypeException
IOException