org.eclipse.jgit.lib
Class TreeEntry

java.lang.Object
  extended by org.eclipse.jgit.lib.TreeEntry
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
FileTreeEntry, GitlinkTreeEntry, SymlinkTreeEntry, Tree

Deprecated. To look up information about a single path, use TreeWalk.forPath(Repository, String, org.eclipse.jgit.revwalk.RevTree). To lookup information about multiple paths at once, use a TreeWalk and obtain the current entry's information from its getter methods.

@Deprecated
public abstract class TreeEntry
extends Object
implements Comparable

This class represents an entry in a tree, like a blob or another tree.


Constructor Summary
protected TreeEntry(Tree myParent, ObjectId myId, byte[] myNameUTF8)
          Deprecated. Construct a named tree entry.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeEntry

protected TreeEntry(Tree myParent,
                    ObjectId myId,
                    byte[] myNameUTF8)
Deprecated. 
Construct a named tree entry.

Parameters:
myParent -
myId -
myNameUTF8 -
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 interface Comparable

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)


Copyright © 2012. All Rights Reserved.