org.eclipse.jgit.diff.DiffFormatter .
A content source is not thread-safe. Sources may contain state, including information about the last ObjectLoader they returned. Callers must be careful to ensure there is no more than one ObjectLoader pending on any source, at any time.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class | ContentSource.
A pair of sources to access the old and new sides of a DiffEntry. |
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Closes the used resources like ObjectReader, TreeWalk etc. Default implementation does nothing. |
| public static ContentSource | Returns: a source wrapping the reader.the reader to obtain blobs from. reader)Construct a content source for an ObjectReader. |
| public static ContentSource | Returns: a content source wrapping the iterator.the iterator to obtain source files through. iterator)Construct a content source for a working directory. |
| public boolean | Returns: true if working tree source and false otherwise (loader must be used)Checks if the source is from "working tree", so it can be accessed as a file directly. |
| public abstract ObjectLoader | |
| public abstract long |
| ContentSource | back to summary |
|---|---|
| public ContentSource() | |
| close | back to summary |
|---|---|
| public void close() Closes the used resources like ObjectReader, TreeWalk etc. Default implementation does nothing.
| |
| create | back to summary |
|---|---|
| public static ContentSource create(ObjectReader reader) Construct a content source for an ObjectReader.
| |
| create | back to summary |
|---|---|
| public static ContentSource create(WorkingTreeIterator iterator) Construct a content source for a working directory.
If the iterator is a
| |
| isWorkingTreeSource | back to summary |
|---|---|
| public boolean isWorkingTreeSource() Checks if the source is from "working tree", so it can be accessed as a file directly.
| |
| open | back to summary |
|---|---|
| public abstract ObjectLoader open(String path, ObjectId id) throws IOException Open the object.
| |
| size | back to summary |
|---|---|
| public abstract long size(String path, ObjectId id) throws IOException Determine the size of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ObjectReader |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Closes the used resources like ObjectReader, TreeWalk etc. Default implementation does nothing. |
| public boolean | isWorkingTreeSource()
Overrides org. Checks if the source is from "working tree", so it can be accessed as a file directly. |
| public ObjectLoader | open(String
the path of the file, relative to the root of the repository. path, ObjectId blob id of the file, if known. id)Implements abstract org. Open the object. |
| public long | size(String
the path of the file, relative to the root of the repository. path, ObjectId blob id of the file, if known. id)Implements abstract org. Determine the size of the object. |
| reader | back to summary |
|---|---|
| private final ObjectReader reader | |
| ObjectReaderSource | back to summary |
|---|---|
| pack-priv ObjectReaderSource(ObjectReader reader) | |
| close | back to summary |
|---|---|
| public void close() Overrides org. Doc from org. Closes the used resources like ObjectReader, TreeWalk etc. Default implementation does nothing.
| |
| isWorkingTreeSource | back to summary |
|---|---|
| public boolean isWorkingTreeSource() Overrides org. Doc from org. Checks if the source is from "working tree", so it can be accessed as a file directly.
| |
| open | back to summary |
|---|---|
| public ObjectLoader open(String path, ObjectId id) throws IOException Implements abstract org. Doc from org. Open the object.
| |
| size | back to summary |
|---|---|
| public long size(String path, ObjectId id) throws IOException Implements abstract org. Doc from org. Determine the size of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ContentSource | |
| private final ContentSource |
| Access | Constructor and Description |
|---|---|
| public | Pair(ContentSource
source to read the old side of a DiffEntry. oldSource, ContentSource source to read the new side of a DiffEntry. newSource)Construct a pair of sources. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: is the source a "working tree"which side of the entry to read (OLD or NEW). sideChecks if source (side) is a "working tree". |
| public ObjectLoader | |
| public long |
| newSource | back to summary |
|---|---|
| private final ContentSource newSource | |
| oldSource | back to summary |
|---|---|
| private final ContentSource oldSource | |
| Pair | back to summary |
|---|---|
| public Pair(ContentSource oldSource, ContentSource newSource) Construct a pair of sources.
| |
| close | back to summary |
|---|---|
| public void close() Closes used resources.
| |
| isWorkingTreeSource | back to summary |
|---|---|
| public boolean isWorkingTreeSource(DiffEntry. Checks if source (side) is a "working tree". | |
| open | back to summary |
|---|---|
| public ObjectLoader open(DiffEntry. Open the object.
| |
| size | back to summary |
|---|---|
| public long size(DiffEntry. Determine the size of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private final WorkingTreeIterator | |
| pack-priv WorkingTreeIterator | |
| private final TreeWalk |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides org. Closes the used resources like ObjectReader, TreeWalk etc. Default implementation does nothing. |
| public boolean | isWorkingTreeSource()
Overrides org. Checks if the source is from "working tree", so it can be accessed as a file directly. |
| public ObjectLoader | open(String
the path of the file, relative to the root of the repository. path, ObjectId blob id of the file, if known. id)Implements abstract org. Open the object. |
| private void | |
| public long | size(String
the path of the file, relative to the root of the repository. path, ObjectId blob id of the file, if known. id)Implements abstract org. Determine the size of the object. |
| current | back to summary |
|---|---|
| private String current | |
| iterator | back to summary |
|---|---|
| private final WorkingTreeIterator iterator | |
| ptr | back to summary |
|---|---|
| pack-priv WorkingTreeIterator ptr | |
| tw | back to summary |
|---|---|
| private final TreeWalk tw | |
| WorkingTreeSource | back to summary |
|---|---|
| pack-priv WorkingTreeSource(WorkingTreeIterator iterator) | |
| close | back to summary |
|---|---|
| public void close() Overrides org. Doc from org. Closes the used resources like ObjectReader, TreeWalk etc. Default implementation does nothing.
| |
| isWorkingTreeSource | back to summary |
|---|---|
| public boolean isWorkingTreeSource() Overrides org. Doc from org. Checks if the source is from "working tree", so it can be accessed as a file directly.
| |
| open | back to summary |
|---|---|
| public ObjectLoader open(String path, ObjectId id) throws IOException Implements abstract org. Doc from org. Open the object.
| |
| seek | back to summary |
|---|---|
| private void seek(String path) throws IOException | |
| size | back to summary |
|---|---|
| public long size(String path, ObjectId id) throws IOException Implements abstract org. Doc from org. Determine the size of the object.
| |