Class LegacyClassExtensions

java.lang.Object
ru.progrm_jarvis.javacommons.classloading.extension.LegacyClassExtensions

public final class LegacyClassExtensions extends Object
Extensions to provide new Class methods on older Java versions.
  • Method Details

    • arrayType

      @NotNull public static <T> @NotNull Class<T[]> arrayType(@NotNull @NotNull Class<?> elementType)
      Gets the class-object corresponding to an array of elements of the given type.
      Type Parameters:
      T - type of array elements
      Parameters:
      elementType - class-object of array elements
      Returns:
      array-type of the specified type
      API note
      this method is available on Class itself since Java 12