Package org.eclipse.jgit.api.errors
Class WrongObjectTypeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.eclipse.jgit.api.errors.GitAPIException
-
- org.eclipse.jgit.api.errors.WrongObjectTypeException
-
- All Implemented Interfaces:
java.io.Serializable
public class WrongObjectTypeException extends GitAPIException
A given object is not of an expected object type.- Since:
- 5.11
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
private static long
serialVersionUID
private int
type
-
Constructor Summary
Constructors Constructor Description WrongObjectTypeException(ObjectId id, int type)
Construct aWrongObjectTypeException
for the specified object id, giving the expected type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getExpectedType()
Retrieves the expected type code.java.lang.String
getObjectId()
Retrieves the name (SHA-1) of the object.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
name
private java.lang.String name
-
type
private int type
-
-
Constructor Detail
-
WrongObjectTypeException
public WrongObjectTypeException(ObjectId id, int type)
Construct aWrongObjectTypeException
for the specified object id, giving the expected type.
-
-
Method Detail
-
getObjectId
public java.lang.String getObjectId()
Retrieves the name (SHA-1) of the object.- Returns:
- the name
-
getExpectedType
public int getExpectedType()
Retrieves the expected type code. SeeConstants
.OBJ_*
.- Returns:
- the type code
-
-