public final enum

GitObjectType

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.atlassian.bitbucket.scm.git.GitObjectType

Class Overview

Defines the types of objects which may be returned by git cat-file -t.

Summary

Enum Values
GitObjectType  BLOB  A blob, which is a file of some type. 
GitObjectType  COMMIT  A commit, which is a submodule
GitObjectType  TAG  A tag, which is a reference to a specific commit and may be annotated, signed or lightweight. 
GitObjectType  TREE  A tree, which is a directory
Public Methods
@Nonnull static GitObjectType fromObjectType(String objectType)
Determines the GitObjectType for the provided git cat-file -t object type.
@Nullable ContentTreeNode.Type getNodeType()
Retrieves the ContentTreeNode.Type for this object type, which may be null for object types that are not readily expressed in as content nodes.
@Nonnull String getObjectType()
Retrieves the type used by git cat-file -t to represent this object type.
static GitObjectType valueOf(String name)
final static GitObjectType[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final GitObjectType BLOB

A blob, which is a file of some type.

public static final GitObjectType COMMIT

A commit, which is a submodule.

public static final GitObjectType TAG

A tag, which is a reference to a specific commit and may be annotated, signed or lightweight.

public static final GitObjectType TREE

A tree, which is a directory.

Public Methods

@Nonnull public static GitObjectType fromObjectType (String objectType)

Determines the GitObjectType for the provided git cat-file -t object type.

Parameters
objectType the git object type
Returns
  • the GitObjectType associated with the provided git object type
Throws
IllegalArgumentException if no GitObjectType matches the provided git object type

@Nullable public ContentTreeNode.Type getNodeType ()

Retrieves the ContentTreeNode.Type for this object type, which may be null for object types that are not readily expressed in as content nodes.

Returns
  • the content node type for this object type, or null if this object should not be shown in the content tree

@Nonnull public String getObjectType ()

Retrieves the type used by git cat-file -t to represent this object type.

Returns
  • the git object type

public static GitObjectType valueOf (String name)

public static final GitObjectType[] values ()