Enum PackageVersion

    • Method Detail

      • values

        public static PackageVersion[] 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 (PackageVersion c : PackageVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PackageVersion 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 name
        NullPointerException - if the argument is null
      • getPackageComponent

        protected @NonNull String getPackageComponent()
      • nms

        public @NonNull String nms​(@NonNull String className)
        Prepends the versioned NMS prefix to the given class name
        Parameters:
        className - the name of the class
        Returns:
        the full class name
      • nmsClass

        public @NonNull Class<?> nmsClass​(@NonNull String className)
                                   throws ClassNotFoundException
        Prepends the versioned NMS prefix to the given class name
        Parameters:
        className - the name of the class
        Returns:
        the class represented by the full class name
        Throws:
        ClassNotFoundException
      • obc

        public @NonNull String obc​(@NonNull String className)
        Prepends the versioned OBC prefix to the given class name
        Parameters:
        className - the name of the class
        Returns:
        the full class name
      • obcClass

        public @NonNull Class<?> obcClass​(@NonNull String className)
                                   throws ClassNotFoundException
        Prepends the versioned OBC prefix to the given class name
        Parameters:
        className - the name of the class
        Returns:
        the class represented by the full class name
        Throws:
        ClassNotFoundException
      • isBefore

        public boolean isBefore​(@NonNull PackageVersion other)
        Gets if this version comes before the other version.
        Parameters:
        other - the other version
        Returns:
        if it comes before
      • isAfter

        public boolean isAfter​(@NonNull PackageVersion other)
        Gets if this version comes after the other version.
        Parameters:
        other - the other version
        Returns:
        if it comes after
      • isBeforeOrEq

        public boolean isBeforeOrEq​(@NonNull PackageVersion other)
        Gets if this version is the same as or comes before the other version.
        Parameters:
        other - the other version
        Returns:
        if it comes before or is the same
      • isAfterOrEq

        public boolean isAfterOrEq​(@NonNull PackageVersion other)
        Gets if this version is the same as or comes after the other version.
        Parameters:
        other - the other version
        Returns:
        if it comes after or is the same
      • runtimeVersion

        public static @NonNull PackageVersion runtimeVersion()
        Gets the package version for the current runtime server instance.
        Returns:
        the package version of the current runtime