Package net.shibboleth.shared.testing

# Class ShowAutomaticModuleNames

java.lang.Object
net.shibboleth.shared.testing.ShowAutomaticModuleNames

public class ShowAutomaticModuleNames extends Object
Command-line utility to show the automatic module names from a `.jar` file or a directory of them.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private static class`
`ShowAutomaticModuleNames.TerminationException`
Throw one of these to cause the main program to terminate.

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final String`
`AUTO_MODULE_NAME`
#AUTO_MODULE_NAME.

## Constructor Summary

Constructors
Constructor
Description
`ShowAutomaticModuleNames()`

## Method Summary

Modifier and Type
Method
Description
`private String`
`getAutomaticModuleName(JarFile jarFile)`
Fetch the automatic module name (if any) from a `.jar` file.
`static void`
`main(String[] args)`
Main program.
`private void`
`run(String[] args)`
Runnable main program, wrapped by `main` in an exception handler.
`private void`
`runDirectory(File directory)`
Process all of the `.jar` files in a given directory, and present the results in a readable way.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### AUTO_MODULE_NAME

private static final String AUTO_MODULE_NAME
#AUTO_MODULE_NAME.

See Also:
  - Constant Field Values

## Constructor Details

### ShowAutomaticModuleNames

public ShowAutomaticModuleNames()

## Method Details

### getAutomaticModuleName

@Nullable private String getAutomaticModuleName(@Nonnull JarFile jarFile) throws ShowAutomaticModuleNames.TerminationException
Fetch the automatic module name (if any) from a `.jar` file.

Parameters:
  `jarFile` - `.jar` file 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.TerminationException
Process all of the `.jar` files 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.TerminationException
Runnable main program, wrapped by `main` in 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