Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.file

pack-priv Class ReflogReaderImpl

extends Object
implements ReflogReader
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.lib.ReflogReader
Static Imports
org.eclipse.jgit.lib.Constants.HEAD

Utility for reading reflog entries

Field Summary

Modifier and TypeField and Description
private File

Constructor Summary

AccessConstructor and Description
pack-priv
ReflogReaderImpl(Repository
repository to read reflogs from
db
,
String
Ref name
refname
)

Method Summary

Modifier and TypeMethod and Description
public ReflogEntry
getLastEntry()

Implements org.eclipse.jgit.lib.ReflogReader.getLastEntry.

Get the last entry in the reflog

public List<ReflogEntry>
getReverseEntries()

Implements org.eclipse.jgit.lib.ReflogReader.getReverseEntries.

Get all reflog entries in reverse order

public List<ReflogEntry>
getReverseEntries(int
max number of entries to read
max
)

Implements org.eclipse.jgit.lib.ReflogReader.getReverseEntries.

Get all reflog entries in reverse order

public ReflogEntry
getReverseEntry(int
a int.
number
)

Implements org.eclipse.jgit.lib.ReflogReader.getReverseEntry.

Get specific entry in the reflog relative to the last entry which is considered entry zero.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logNameback to summary
private File logName

Constructor Detail

ReflogReaderImplback to summary
pack-priv ReflogReaderImpl(Repository db, String refname)
Parameters
db:Repository

repository to read reflogs from

refname:String

Ref name

Method Detail

getLastEntryback to summary
public ReflogEntry getLastEntry() throws IOException

Implements org.eclipse.jgit.lib.ReflogReader.getLastEntry.

Doc from org.eclipse.jgit.lib.ReflogReader.getLastEntry.

Get the last entry in the reflog

Returns:ReflogEntry

the latest reflog entry, or null if no log

Annotations
@Override
Exceptions
IOException:
if an IO error occurred
getReverseEntriesback to summary
public List<ReflogEntry> getReverseEntries() throws IOException

Implements org.eclipse.jgit.lib.ReflogReader.getReverseEntries.

Doc from org.eclipse.jgit.lib.ReflogReader.getReverseEntries.

Get all reflog entries in reverse order

Returns:List<ReflogEntry>

all reflog entries in reverse order

Annotations
@Override
Exceptions
IOException:
if an IO error occurred
getReverseEntriesback to summary
public List<ReflogEntry> getReverseEntries(int max) throws IOException

Implements org.eclipse.jgit.lib.ReflogReader.getReverseEntries.

Doc from org.eclipse.jgit.lib.ReflogReader.getReverseEntries.

Get all reflog entries in reverse order

Parameters
max:int

max number of entries to read

Returns:List<ReflogEntry>

all reflog entries in reverse order

Annotations
@Override
Exceptions
IOException:
if an IO error occurred
getReverseEntryback to summary
public ReflogEntry getReverseEntry(int number) throws IOException

Implements org.eclipse.jgit.lib.ReflogReader.getReverseEntry.

Doc from org.eclipse.jgit.lib.ReflogReader.getReverseEntry.

Get specific entry in the reflog relative to the last entry which is considered entry zero.

Parameters
number:int

a int.

Returns:ReflogEntry

reflog entry or null if not found

Annotations
@Override
Exceptions
IOException:
if an IO error occurred