Class ClassPathHelper

java.lang.Object
com.helger.commons.lang.ClassPathHelper

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

    • getAllClassPathEntries

      @Nonnull @ReturnsMutableCopy public static ICommonsList<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.