Package com.atlassian.bitbucket.scm.git
Enum Class GitObjectType
- All Implemented Interfaces:
Serializable,Comparable<GitObjectType>,Constable
Defines the types of objects which may be returned by
git cat-file -t.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic GitObjectTypefromObjectType(String objectType) Determines theGitObjectTypefor the providedgit cat-file -tobject type.com.atlassian.bitbucket.content.ContentTreeNode.TypeRetrieves theContentTreeNode.Typefor this object type, which may benullfor object types that are not readily expressed in as content nodes.Retrieves the type used bygit cat-file -tto represent this object type.static GitObjectTypeReturns the enum constant of this class with the specified name.static GitObjectType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BLOB
A blob, which is afileof some type. -
COMMIT
A commit, which is asubmodule. -
TAG
A tag, which is a reference to a specificcommitand may be annotated, signed or lightweight. -
TREE
A tree, which is adirectory.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromObjectType
Determines theGitObjectTypefor the providedgit cat-file -tobject type.- Parameters:
objectType- thegitobject type- Returns:
- the
GitObjectTypeassociated with the providedgitobject type - Throws:
IllegalArgumentException- if noGitObjectTypematches the providedgitobject type
-
getNodeType
@Nullable public com.atlassian.bitbucket.content.ContentTreeNode.Type getNodeType()Retrieves theContentTreeNode.Typefor this object type, which may benullfor object types that are not readily expressed in as content nodes.- Returns:
- the content node type for this object type, or
nullif this object should not be shown in the content tree
-
getObjectType
Retrieves the type used bygit cat-file -tto represent this object type.- Returns:
- the
gitobject type
-