Package com.helger.commons.lang
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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidforAllClassPathEntries(Consumer<? super String> aConsumer)Iterate all class path entries and invoke the provided consumer.static ICommonsList<String>getAllClassPathEntries()static voidprintClassPathEntries(PrintStream aPS)Print all class path entries on the passed print stream, using the system line separatorstatic voidprintClassPathEntries(PrintStream aPS, String sItemSeparator)Print all class path entries on the passed print stream, using the passed separator
-
-
-
Method Detail
-
getAllClassPathEntries
@Nonnull @ReturnsMutableCopy public static ICommonsList<String> getAllClassPathEntries()
- Returns:
- A non-
nulllist 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 benull.
-
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 benull.
-
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 benull.sItemSeparator- The separator to be printed between each item.
-
-