Class WrongObjectTypeException

All Implemented Interfaces:
Serializable

public class WrongObjectTypeException extends GitAPIException
A given object is not of an expected object type.
Since:
5.11
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      private String name
    • type

      private int type
  • Constructor Details

    • WrongObjectTypeException

      public WrongObjectTypeException(ObjectId id, int type)
      Construct a WrongObjectTypeException for the specified object id, giving the expected type.
      Parameters:
      id - ObjectId of the object with the unexpected type
      type - expected object type code; see Constants.OBJ_*.
  • Method Details

    • getObjectId

      public String getObjectId()
      Retrieves the name (SHA-1) of the object.
      Returns:
      the name
    • getExpectedType

      public int getExpectedType()
      Retrieves the expected type code. See Constants.OBJ_*.
      Returns:
      the type code