public enum PackageVersion extends Enum<PackageVersion>
| Enum Constant and Description |
|---|
NONE |
v1_10_R1 |
v1_11_R1 |
v1_12_R1 |
v1_13_R1 |
v1_13_R2 |
v1_14_R1 |
v1_15_R1 |
v1_16_R1 |
v1_16_R2 |
v1_7_R1 |
v1_7_R2 |
v1_7_R3 |
v1_7_R4 |
v1_8_R1 |
v1_8_R2 |
v1_8_R3 |
v1_9_R1 |
v1_9_R2 |
| Modifier and Type | Field and Description |
|---|---|
static String |
NMS
The nms prefix (without the version component)
|
static String |
OBC
The obc prefix (without the version component)
|
| Modifier and Type | Method and Description |
|---|---|
protected @NonNull String |
getPackageComponent() |
boolean |
isAfter(@NonNull PackageVersion other)
Gets if this version comes after the
other version. |
boolean |
isAfterOrEq(@NonNull PackageVersion other)
Gets if this version is the same as or comes after the
other version. |
boolean |
isBefore(@NonNull PackageVersion other)
Gets if this version comes before the
other version. |
boolean |
isBeforeOrEq(@NonNull PackageVersion other)
Gets if this version is the same as or comes before the
other version. |
@NonNull String |
nms(@NonNull String className)
Prepends the versioned NMS prefix to the given class name
|
@NonNull Class<?> |
nmsClass(@NonNull String className)
Prepends the versioned NMS prefix to the given class name
|
@NonNull String |
obc(@NonNull String className)
Prepends the versioned OBC prefix to the given class name
|
@NonNull Class<?> |
obcClass(@NonNull String className)
Prepends the versioned OBC prefix to the given class name
|
static @NonNull PackageVersion |
runtimeVersion()
Gets the package version for the current runtime server instance.
|
static PackageVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PackageVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PackageVersion NONE
public static final PackageVersion v1_7_R1
public static final PackageVersion v1_7_R2
public static final PackageVersion v1_7_R3
public static final PackageVersion v1_7_R4
public static final PackageVersion v1_8_R1
public static final PackageVersion v1_8_R2
public static final PackageVersion v1_8_R3
public static final PackageVersion v1_9_R1
public static final PackageVersion v1_9_R2
public static final PackageVersion v1_10_R1
public static final PackageVersion v1_11_R1
public static final PackageVersion v1_12_R1
public static final PackageVersion v1_13_R1
public static final PackageVersion v1_13_R2
public static final PackageVersion v1_14_R1
public static final PackageVersion v1_15_R1
public static final PackageVersion v1_16_R1
public static final PackageVersion v1_16_R2
public static final String NMS
public static final String OBC
public static PackageVersion[] values()
for (PackageVersion c : PackageVersion.values()) System.out.println(c);
public static PackageVersion valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullprotected @NonNull String getPackageComponent()
public @NonNull String nms(@NonNull String className)
className - the name of the classpublic @NonNull Class<?> nmsClass(@NonNull String className) throws ClassNotFoundException
className - the name of the classClassNotFoundExceptionpublic @NonNull String obc(@NonNull String className)
className - the name of the classpublic @NonNull Class<?> obcClass(@NonNull String className) throws ClassNotFoundException
className - the name of the classClassNotFoundExceptionpublic boolean isBefore(@NonNull PackageVersion other)
other version.other - the other versionpublic boolean isAfter(@NonNull PackageVersion other)
other version.other - the other versionpublic boolean isBeforeOrEq(@NonNull PackageVersion other)
other version.other - the other versionpublic boolean isAfterOrEq(@NonNull PackageVersion other)
other version.other - the other versionpublic static @NonNull PackageVersion runtimeVersion()