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 aTreeWalkand 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 intcompareTo(Object o)Deprecated.voiddelete()Deprecated.Delete this entry.voiddetachParent()Deprecated.Detach this entry from it's parent.StringgetFullName()Deprecated.byte[]getFullNameUTF8()Deprecated.ObjectIdgetId()Deprecated.abstract FileModegetMode()Deprecated.StringgetName()Deprecated.byte[]getNameUTF8()Deprecated.TreegetParent()Deprecated.RepositorygetRepository()Deprecated.booleanisModified()Deprecated.static intlastChar(TreeEntry treeEntry)Deprecated.Helper for accessing tree/blob methods.voidrename(byte[] n)Deprecated.Rename this entry.voidrename(String n)Deprecated.Rename this entry.voidsetId(ObjectId n)Deprecated.Set (update) the SHA-1 of this entry.voidsetModified()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 IOExceptionDeprecated.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:
compareToin 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)
-
-