Class ShowAutomaticModuleNames
- java.lang.Object
-
- net.shibboleth.utilities.java.support.testing.ShowAutomaticModuleNames
-
public class ShowAutomaticModuleNames extends Object
Command-line utility to show the automatic module names from a.jarfile or a directory of them.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classShowAutomaticModuleNames.TerminationExceptionThrow one of these to cause the main program to terminate.
-
Field Summary
Fields Modifier and Type Field Description private static StringAUTO_MODULE_NAME
-
Constructor Summary
Constructors Constructor Description ShowAutomaticModuleNames()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private StringgetAutomaticModuleName(JarFile jarFile)Fetch the automatic module name (if any) from a.jarfile.static voidmain(String[] args)Main program.private voidrun(String[] args)Runnable main program, wrapped bymainin an exception handler.private voidrunDirectory(File directory)Process all of the.jarfiles in a given directory, and present the results in a readable way.
-
-
-
Field Detail
-
AUTO_MODULE_NAME
private static final String AUTO_MODULE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAutomaticModuleName
@Nullable private String getAutomaticModuleName(@Nonnull JarFile jarFile) throws ShowAutomaticModuleNames.TerminationException
Fetch the automatic module name (if any) from a.jarfile.- Parameters:
jarFile-.jarfile to process- Returns:
- the automatic module name, or
null - Throws:
ShowAutomaticModuleNames.TerminationException- if something goes wrong
-
runDirectory
private void runDirectory(@Nonnull File directory) throws ShowAutomaticModuleNames.TerminationExceptionProcess all of the.jarfiles in a given directory, and present the results in a readable way.- Parameters:
directory- directory to process- Throws:
ShowAutomaticModuleNames.TerminationException- if something goes wrong
-
run
private void run(@Nonnull String[] args) throws ShowAutomaticModuleNames.TerminationExceptionRunnable main program, wrapped bymainin an exception handler.- Parameters:
args- command-line arguments- Throws:
ShowAutomaticModuleNames.TerminationException- if something bad happens
-
main
public static void main(String[] args)
Main program.- Parameters:
args- command-line arguments
-
-