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
abstract class Generator extends java.lang.Object
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:
PendingGenerator
,StartGenerator
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
firstParent
(package private) static int
HAS_REWRITE
Output may haveRevWalk.REWRITE
marked on it.(package private) static int
HAS_UNINTERESTING
Output may haveRevWalk.UNINTERESTING
marked on it.(package private) static int
NEEDS_REWRITE
Output needsRewriteGenerator
.(package private) static int
SORT_COMMIT_TIME_DESC
Commits are sorted by commit date and time, descending.(package private) static int
SORT_TOPO
Topological ordering is enforced (all children before parents).
-
Constructor Summary
Constructors Modifier Constructor Description protected
Generator(boolean firstParent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract RevCommit
next()
Return the next commit to the application, or the next generator.(package private) abstract int
outputType()
Obtain flags describing the output behavior of this generator.(package private) void
shareFreeList(BlockRevQueue q)
Connect the supplied queue to this generator's own free list (if any).
-
-
-
Field Detail
-
SORT_COMMIT_TIME_DESC
static final int SORT_COMMIT_TIME_DESC
Commits are sorted by commit date and time, descending.- See Also:
- Constant Field Values
-
HAS_REWRITE
static final int HAS_REWRITE
Output may haveRevWalk.REWRITE
marked on it.- See Also:
- Constant Field Values
-
NEEDS_REWRITE
static final int NEEDS_REWRITE
Output needsRewriteGenerator
.- See Also:
- Constant Field Values
-
SORT_TOPO
static final int SORT_TOPO
Topological ordering is enforced (all children before parents).- See Also:
- Constant Field Values
-
HAS_UNINTERESTING
static final int HAS_UNINTERESTING
Output may haveRevWalk.UNINTERESTING
marked on it.- See Also:
- Constant Field Values
-
firstParent
protected final boolean firstParent
-
-
Method Detail
-
shareFreeList
void shareFreeList(BlockRevQueue q)
Connect the supplied queue to this generator's own free list (if any).- Parameters:
q
- another FIFO queue that wants to share our queue's free list.
-
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
abstract RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
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
java.io.IOException
-
-