Class ClassPathHelper

java.lang.Object
com.helger.base.lang.ClassPathHelper

@Immutable public final class ClassPathHelper extends Object
Utility class for dealing with the Java class path.
Author:
Philip Helger
  • Method Details

    • getAllClassPathEntries

      @ReturnsMutableCopy public static @NonNull List<String> getAllClassPathEntries()
      Returns:
      A non-null list of all directories and files currently in the class path.
    • forAllClassPathEntries

      public static void forAllClassPathEntries(@NonNull Consumer<? super String> aConsumer)
      Iterate all class path entries and invoke the provided consumer.
      Parameters:
      aConsumer - The target consumer invoked for all entries. May not be null.
    • printClassPathEntries

      public static void printClassPathEntries(@NonNull PrintStream aPS)
      Print all class path entries on the passed print stream, using the system line separator
      Parameters:
      aPS - The print stream to print to. May not be null.
    • printClassPathEntries

      public static void printClassPathEntries(@NonNull PrintStream aPS, @NonNull String sItemSeparator)
      Print all class path entries on the passed print stream, using the passed separator
      Parameters:
      aPS - The print stream to print to. May not be null.
      sItemSeparator - The separator to be printed between each item.