Package hudson.plugins.git
Class GitObject
- java.lang.Object
-
- hudson.plugins.git.GitObject
-
- All Implemented Interfaces:
Serializable
@ExportedBean(defaultVisibility=999) public class GitObject extends Object implements Serializable
An object in a git repository. Includes the SHA1 and name of the object stored in git (tag, branch, etc.).- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Indicates whether some other object is "equal to" this one.StringgetName()Returns the name of this git object (branch name, tag name, etc.).org.eclipse.jgit.lib.ObjectIdgetSHA1()Returns the SHA1 hash of this git object as anObjectId.StringgetSHA1String()Returns the SHA1 hash of this git object as a String.inthashCode()Returns a hash code value for the object.
-
-
-
Method Detail
-
getSHA1
public org.eclipse.jgit.lib.ObjectId getSHA1()
Returns the SHA1 hash of this git object as anObjectId.- Returns:
ObjectIdSHA1 of the object.
-
getName
@Exported public String getName()
Returns the name of this git object (branch name, tag name, etc.).- Returns:
Stringname of the object.
-
getSHA1String
@Exported(name="SHA1") public String getSHA1String()
Returns the SHA1 hash of this git object as a String.- Returns:
StringSHA1 of the object.
-
hashCode
public int hashCode()
Returns a hash code value for the object. Considers sha1 and name in the calculation.
-
equals
public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one. Includes sha1 and name in the comparison. Objects of subclasses of this object are not equal to objects of this class, even if they add no fields.
-
-