Package org.eclipse.jgit.lib
Class TreeEntry
- java.lang.Object
-
- org.eclipse.jgit.lib.TreeEntry
-
- All Implemented Interfaces:
Comparable
- Direct Known Subclasses:
FileTreeEntry
,GitlinkTreeEntry
,SymlinkTreeEntry
,Tree
@Deprecated public abstract class TreeEntry extends Object implements Comparable
Deprecated.To look up information about a single path, useTreeWalk.forPath(Repository, String, org.eclipse.jgit.revwalk.RevTree)
. To lookup information about multiple paths at once, use aTreeWalk
and obtain the current entry's information from its getter methods.This class represents an entry in a tree, like a blob or another tree.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compareTo(Object o)
Deprecated.void
delete()
Deprecated.Delete this entry.void
detachParent()
Deprecated.Detach this entry from it's parent.String
getFullName()
Deprecated.byte[]
getFullNameUTF8()
Deprecated.ObjectId
getId()
Deprecated.abstract FileMode
getMode()
Deprecated.String
getName()
Deprecated.byte[]
getNameUTF8()
Deprecated.Tree
getParent()
Deprecated.Repository
getRepository()
Deprecated.boolean
isModified()
Deprecated.static int
lastChar(TreeEntry treeEntry)
Deprecated.Helper for accessing tree/blob methods.void
rename(byte[] n)
Deprecated.Rename this entry.void
rename(String n)
Deprecated.Rename this entry.void
setId(ObjectId n)
Deprecated.Set (update) the SHA-1 of this entry.void
setModified()
Deprecated.Mark this entry as modified.
-
-
-
Method Detail
-
getParent
public Tree getParent()
Deprecated.- Returns:
- parent of this tree.
-
delete
public void delete()
Deprecated.Delete this entry.
-
detachParent
public void detachParent()
Deprecated.Detach this entry from it's parent.
-
getRepository
public Repository getRepository()
Deprecated.- Returns:
- the repository owning this entry.
-
getNameUTF8
public byte[] getNameUTF8()
Deprecated.- Returns:
- the raw byte name of this entry.
-
getName
public String getName()
Deprecated.- Returns:
- the name of this entry.
-
rename
public void rename(String n) throws IOException
Deprecated.Rename this entry.- Parameters:
n
- The new name- Throws:
IOException
-
rename
public void rename(byte[] n) throws IOException
Deprecated.Rename this entry.- Parameters:
n
- The new name- Throws:
IOException
-
isModified
public boolean isModified()
Deprecated.- Returns:
- true if this entry is new or modified since being loaded.
-
setModified
public void setModified()
Deprecated.Mark this entry as modified.
-
getId
public ObjectId getId()
Deprecated.- Returns:
- SHA-1 of this tree entry (null for new unhashed entries)
-
setId
public void setId(ObjectId n)
Deprecated.Set (update) the SHA-1 of this entry. Invalidates the id's of all entries above this entry as they will have to be recomputed.- Parameters:
n
- SHA-1 for this entry.
-
getFullName
public String getFullName()
Deprecated.- Returns:
- repository relative name of this entry
-
getFullNameUTF8
public byte[] getFullNameUTF8()
Deprecated.- Returns:
- repository relative name of the entry FIXME better encoding
-
compareTo
public int compareTo(Object o)
Deprecated.- Specified by:
compareTo
in interfaceComparable
-
lastChar
public static final int lastChar(TreeEntry treeEntry)
Deprecated.Helper for accessing tree/blob methods.- Parameters:
treeEntry
-- Returns:
- '/' for Tree entries and NUL for non-treeish objects.
-
getMode
public abstract FileMode getMode()
Deprecated.- Returns:
- mode (type of object)
-
-