APIdia Launch Partner
Top Description Inners Methods
jdk.tools.jlink.plugin

public Interface Plugin

Known Direct Implementers
jdk.tools.jlink.internal.plugins.AbstractPlugin
Imports
java.util.EnumSet, .Map, .Set, jdk.tools.jlink.internal.plugins.PluginsResourceBundle

Base interface that jlink plugins should implement.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Plugin.Category

Order of categories matches the plugin sort order.

public static enum
Plugin.State

Plugin state:

  • DISABLED: The plugin is not exposed in help and will be not called.
  • AUTO_ENABLED: The plugin is enabled by default. It doesn't require its option to be present to be called.
  • FUNCTIONAL: The plugin is properly configured and can operate. Non functional plugin must advertise their status in the getStateDescription method

Method Summary

Modifier and TypeMethod and Description
public default void
configure(Map<String, String>
The plugin configuration.
config
)

Configure the plugin based on the passed configuration.

public default String

Returns:

The argument(s) description.
getArgumentsDescription
()

The plugin argument(s) description.

public default String

Returns:

The description.
getDescription
()

The plugin description.

public default String

Returns:

The name.
getName
()

The plugin name.

public default String

Returns:

The plugin option.
getOption
()

The option that identifies this plugin.

public default Set<Plugin.State>

Returns:

The set of states.
getState
()

The Plugin set of states.

public default String

Returns:

A status description.
getStateDescription
()

Return a message indicating the status of the provider.

public default Plugin.Category

Returns:

The type of this plugin
getType
()

The type of this plugin.

public default String

Returns:

The usage.
getUsage
()

The plugin usage for printing to console.

public default boolean

Returns:

true if arguments are needed.
hasArguments
()

Has this plugin require one or more arguments?

public default boolean
public ResourcePool
transform(ResourcePool
Read only content.
in
,
ResourcePoolBuilder
The pool to fill with content. This pool must contain the result of the visit.
out
)

Visit the content of the modules that are composing the image.

Method Detail

configureback to summary
public default void configure(Map<String, String> config)

Configure the plugin based on the passed configuration. This method is called prior to invoke the plugin.

Parameters
config:Map<String, String>

The plugin configuration.

Exceptions
IllegalArgumentException:
if a mandatory argument is missing or if an argument has invalid value.
getArgumentsDescriptionback to summary
public default String getArgumentsDescription()

The plugin argument(s) description.

Returns:String

The argument(s) description.

getDescriptionback to summary
public default String getDescription()

The plugin description.

Returns:String

The description.

getNameback to summary
public default String getName()

The plugin name.

Returns:String

The name.

getOptionback to summary
public default String getOption()

The option that identifies this plugin. This may be null. "--" is prefixed to the String (when non-null) when invoking this plugin from jlink command line.

Returns:String

The plugin option.

getStateback to summary
public default Set<Plugin.State> getState()

The Plugin set of states.

Returns:Set<Plugin.State>

The set of states.

getStateDescriptionback to summary
public default String getStateDescription()

Return a message indicating the status of the provider.

Returns:String

A status description.

getTypeback to summary
public default Plugin.Category getType()

The type of this plugin.

Returns:Plugin.Category

The type of this plugin

getUsageback to summary
public default String getUsage()

The plugin usage for printing to console.

Returns:String

The usage.

hasArgumentsback to summary
public default boolean hasArguments()

Has this plugin require one or more arguments? A plugin can have one or more optional arguments.
A plugin option with a single argument is specified as follows:

     --plugin-option=arg_value
 
If there are more than arguments, command line option looks like:
     --plugin-option=arg_value:arg2=value2:arg3=value3...
Returns:boolean

true if arguments are needed.

hasRawArgumentback to summary
public default boolean hasRawArgument()
transformback to summary
public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out)

Visit the content of the modules that are composing the image.

Parameters
in:ResourcePool

Read only content.

out:ResourcePoolBuilder

The pool to fill with content. This pool must contain the result of the visit.

jdk.tools.jlink.plugin back to summary

public final Enum Plugin.Category

extends Enum<Plugin.Category>
Class Inheritance

Order of categories matches the plugin sort order.
  1. FILTER: Filter in/out resources or files.
  2. ADDER: Add resources or files.
  3. TRANSFORMER: Transform resources or files(eg: refactoring, bytecode manipulation).
  4. MODULEINFO_TRANSFORMER: Transform only module-info.class
  5. SORTER: Sort resources within the resource container.
  6. METAINFO_ADDER: Added meta info (like release, copyright etc.)
  7. COMPRESSOR: Compress resource within the resource containers.
  8. VERIFIER: Does some image verification.
  9. PROCESSOR: Does some post processing on image.
  10. PACKAGER: Final processing

Field Summary

Modifier and TypeField and Description
public static final Plugin.Category
public static final Plugin.Category
public static final Plugin.Category
public static final Plugin.Category
public static final Plugin.Category
private final String
public static final Plugin.Category
public static final Plugin.Category
public static final Plugin.Category
public static final Plugin.Category
public static final Plugin.Category

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
public static Plugin.Category
public static Plugin.Category[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ADDERback to summary
public static final Plugin.Category ADDER
COMPRESSORback to summary
public static final Plugin.Category COMPRESSOR
FILTERback to summary
public static final Plugin.Category FILTER
METAINFO_ADDERback to summary
public static final Plugin.Category METAINFO_ADDER
MODULEINFO_TRANSFORMERback to summary
public static final Plugin.Category MODULEINFO_TRANSFORMER
nameback to summary
private final String name

Hides java.lang.Enum.name.

PACKAGERback to summary
public static final Plugin.Category PACKAGER
PROCESSORback to summary
public static final Plugin.Category PROCESSOR
SORTERback to summary
public static final Plugin.Category SORTER
TRANSFORMERback to summary
public static final Plugin.Category TRANSFORMER
VERIFIERback to summary
public static final Plugin.Category VERIFIER

Constructor Detail

Categoryback to summary
private Category(String name)

Method Detail

getNameback to summary
public String getName()
valueOfback to summary
public static Plugin.Category valueOf(String name)
valuesback to summary
public static Plugin.Category[] values()
jdk.tools.jlink.plugin back to summary

public final Enum Plugin.State

extends Enum<Plugin.State>
Class Inheritance

Plugin state:

Field Summary

Modifier and TypeField and Description
public static final Plugin.State
public static final Plugin.State
public static final Plugin.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Plugin.State
public static Plugin.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AUTO_ENABLEDback to summary
public static final Plugin.State AUTO_ENABLED
DISABLEDback to summary
public static final Plugin.State DISABLED
FUNCTIONALback to summary
public static final Plugin.State FUNCTIONAL

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static Plugin.State valueOf(String name)
valuesback to summary
public static Plugin.State[] values()