Package org.eclipse.jgit.transport
Enum TransferConfig.ProtocolVersion
- java.lang.Object
-
- java.lang.Enum<TransferConfig.ProtocolVersion>
-
- org.eclipse.jgit.transport.TransferConfig.ProtocolVersion
-
- All Implemented Interfaces:
Serializable
,Comparable<TransferConfig.ProtocolVersion>
- Enclosing class:
- TransferConfig
public static enum TransferConfig.ProtocolVersion extends Enum<TransferConfig.ProtocolVersion>
A git configuration variable for which versions of the Git protocol to prefer. Used in protocol.version.- Since:
- 5.9
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransferConfig.ProtocolVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static TransferConfig.ProtocolVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.String
version()
Returns version number
-
-
-
Enum Constant Detail
-
V0
public static final TransferConfig.ProtocolVersion V0
Git wire protocol version 0 (the default).
-
V2
public static final TransferConfig.ProtocolVersion V2
Git wire protocol version 2.
-
-
Method Detail
-
values
public static TransferConfig.ProtocolVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TransferConfig.ProtocolVersion c : TransferConfig.ProtocolVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransferConfig.ProtocolVersion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
version
public String version()
Returns version number- Returns:
- string version
-
-