APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.tools.jlink.internal

public final Class ImagePluginStack

extends Object
Class Inheritance
Imports
java.io.DataOutputStream, .IOException, java.lang.module.ModuleDescriptor, java.nio.ByteOrder, java.util.*, java.util.stream.Stream, jdk.internal.jimage.decompressor.Decompressor, jdk.internal.module.ModuleInfo.Attributes, .ModuleTarget, jdk.tools.jlink.builder.ImageBuilder, jdk.tools.jlink.plugin.Plugin, .PluginException, .ResourcePool, .ResourcePoolEntry, .ResourcePoolModule

Plugins Stack. Plugins entry point to apply transformations onto resources and files.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static interface
private static class
ImagePluginStack.LastPoolManager

This pool wrap the original pool and automatically uncompress ResourcePoolEntry if needed.

public static class
private static class

Field Summary

Modifier and TypeField and Description
private final ImageBuilder
private final Plugin
private final List<Plugin>
private final List<ResourcePrevisitor>
private final boolean

Constructor Summary

AccessConstructor and Description
public
public
ImagePluginStack(ImageBuilder imageBuilder, List<Plugin> plugins, Plugin lastSorter)

public
ImagePluginStack(ImageBuilder imageBuilder, List<Plugin> plugins, Plugin lastSorter, boolean validate)

Method Summary

Modifier and TypeMethod and Description
public ExecutableImage
public ImageBuilder
public DataOutputStream
public void
public void
storeFiles(ResourcePool original, ResourcePool transformed, BasicImageWriter writer)

Make the imageBuilder to store files.

public ResourcePool

Returns:

The result of the visit.
visitResources
(ResourcePoolManager
The set of resources to visit
resources
)

Resource Plugins stack entry point.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

imageBuilderback to summary
private final ImageBuilder imageBuilder
lastSorterback to summary
private final Plugin lastSorter
pluginsback to summary
private final List<Plugin> plugins
resourcePrevisitorsback to summary
private final List<ResourcePrevisitor> resourcePrevisitors
validateback to summary
private final boolean validate

Constructor Detail

ImagePluginStackback to summary
public ImagePluginStack()
ImagePluginStackback to summary
public ImagePluginStack(ImageBuilder imageBuilder, List<Plugin> plugins, Plugin lastSorter)
ImagePluginStackback to summary
public ImagePluginStack(ImageBuilder imageBuilder, List<Plugin> plugins, Plugin lastSorter, boolean validate)

Method Detail

getExecutableImageback to summary
public ExecutableImage getExecutableImage() throws IOException
getImageBuilderback to summary
public ImageBuilder getImageBuilder()
getJImageFileOutputStreamback to summary
public DataOutputStream getJImageFileOutputStream() throws IOException
operateback to summary
public void operate(ImagePluginStack.ImageProvider provider) throws Exception
storeFilesback to summary
public void storeFiles(ResourcePool original, ResourcePool transformed, BasicImageWriter writer) throws Exception

Make the imageBuilder to store files.

visitResourcesback to summary
public ResourcePool visitResources(ResourcePoolManager resources) throws Exception

Resource Plugins stack entry point. All resources are going through all the plugins.

Parameters
resources:ResourcePoolManager

The set of resources to visit

Returns:ResourcePool

The result of the visit.

jdk.tools.jlink.internal back to summary

private final Class ImagePluginStack.CheckOrderResourcePoolManager

extends ResourcePoolManager
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private final List<ResourcePoolEntry>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(ResourcePoolEntry
The Resource to add.
resource
)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.add.

Add a resource.

Inherited from jdk.tools.jlink.internal.ResourcePoolManager:
byteOrdercontainsentriesentryCountfindEntryfindEntryInContextfindModulegetStringTableisEmptymoduleCountmodulesmoduleViewnewCompressedResourcereadModuleAttributesresourcePoolresourcePoolBuilder

Field Detail

currentIndexback to summary
private int currentIndex
orderedListback to summary
private final List<ResourcePoolEntry> orderedList

Constructor Detail

CheckOrderResourcePoolManagerback to summary
public CheckOrderResourcePoolManager(ByteOrder order, List<ResourcePoolEntry> orderedList, StringTable table)

Method Detail

addback to summary
public void add(ResourcePoolEntry resource)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.add.

Add a resource.

Parameters
resource:ResourcePoolEntry

The Resource to add.

Annotations
@Override
jdk.tools.jlink.internal back to summary

public Interface ImagePluginStack.ImageProvider

Known Direct Implementers
jdk.tools.jlink.internal.JlinkTask.ImageHelper

Method Summary

Modifier and TypeMethod and Description
public ExecutableImage

Method Detail

retrieveback to summary
public ExecutableImage retrieve(ImagePluginStack stack) throws IOException
jdk.tools.jlink.internal back to summary

private Class ImagePluginStack.LastPoolManager

extends ResourcePoolManager
Class Inheritance

This pool wrap the original pool and automatically uncompress ResourcePoolEntry if needed.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
pack-priv Collection<ResourcePoolEntry>
pack-priv Decompressor
private final ResourcePool

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(ResourcePoolEntry resource)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.add.

Add a ResourcePoolEntry.

public ByteOrder
byteOrder()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.byteOrder.

The ByteOrder currently in use when generating the jimage file.

public boolean
contains(ResourcePoolEntry res)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.contains.

Check if the ResourcePool contains the given ResourcePoolEntry.

public Stream<ResourcePoolEntry>

Returns:

The stream of resources;
entries
()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.entries.

Get all resources contained in this pool instance.

public int
entryCount()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.entryCount.

Return the number of ResourcePoolEntry count in this ResourcePool.

public Optional<ResourcePoolEntry>

Returns:

A Resource instance if the resource is found
findEntry
(String
A resource path
path
)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.findEntry.

Get the resource for the passed path.

public Optional<ResourcePoolEntry>
findEntryInContext(String path, ResourcePoolEntry context)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.findEntryInContext.

Get the ResourcePoolEntry for the passed path restricted to supplied context.

public Optional<ResourcePoolModule>
findModule(String name)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.findModule.

Retrieves the module for the provided name.

private ResourcePoolEntry
public boolean
isEmpty()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.isEmpty.

Check if the ResourcePool contains some content at all.

public int
moduleCount()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.moduleCount.

Return the number of ResourcePoolModule count in this ResourcePool.

public Stream<ResourcePoolModule>

Returns:

The collection of modules.
modules
()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.modules.

The collection of modules contained in this pool.

Inherited from jdk.tools.jlink.internal.ResourcePoolManager:
getStringTablemoduleViewnewCompressedResourcereadModuleAttributesresourcePoolresourcePoolBuilder

Field Detail

contentback to summary
pack-priv Collection<ResourcePoolEntry> content
decompressorback to summary
pack-priv Decompressor decompressor
poolback to summary
private final ResourcePool pool

Constructor Detail

LastPoolManagerback to summary
pack-priv LastPoolManager(ResourcePool pool)

Method Detail

addback to summary
public void add(ResourcePoolEntry resource)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.add.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.add.

Add a ResourcePoolEntry.

Annotations
@Override
byteOrderback to summary
public ByteOrder byteOrder()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.byteOrder.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.byteOrder.

The ByteOrder currently in use when generating the jimage file.

Annotations
@Override
containsback to summary
public boolean contains(ResourcePoolEntry res)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.contains.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.contains.

Check if the ResourcePool contains the given ResourcePoolEntry.

Annotations
@Override
entriesback to summary
public Stream<ResourcePoolEntry> entries()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.entries.

Get all resources contained in this pool instance.

Returns:Stream<ResourcePoolEntry>

The stream of resources;

Annotations
@Override
entryCountback to summary
public int entryCount()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.entryCount.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.entryCount.

Return the number of ResourcePoolEntry count in this ResourcePool.

Annotations
@Override
findEntryback to summary
public Optional<ResourcePoolEntry> findEntry(String path)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.findEntry.

Get the resource for the passed path.

Parameters
path:String

A resource path

Returns:Optional<ResourcePoolEntry>

A Resource instance if the resource is found

Annotations
@Override
findEntryInContextback to summary
public Optional<ResourcePoolEntry> findEntryInContext(String path, ResourcePoolEntry context)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.findEntryInContext.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.findEntryInContext.

Get the ResourcePoolEntry for the passed path restricted to supplied context.

Annotations
@Override
findModuleback to summary
public Optional<ResourcePoolModule> findModule(String name)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.findModule.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.findModule.

Retrieves the module for the provided name.

Annotations
@Override
getUncompressedback to summary
private ResourcePoolEntry getUncompressed(ResourcePoolEntry res)
isEmptyback to summary
public boolean isEmpty()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.isEmpty.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.isEmpty.

Check if the ResourcePool contains some content at all.

Annotations
@Override
moduleCountback to summary
public int moduleCount()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.moduleCount.

Doc from jdk.tools.jlink.internal.ResourcePoolManager.moduleCount.

Return the number of ResourcePoolModule count in this ResourcePool.

Annotations
@Override
modulesback to summary
public Stream<ResourcePoolModule> modules()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.modules.

The collection of modules contained in this pool.

Returns:Stream<ResourcePoolModule>

The collection of modules.

Annotations
@Override
jdk.tools.jlink.internal back to summary

private Class ImagePluginStack.LastPoolManager.LastModule

extends Object
implements ResourcePoolModule
Class Inheritance
  • java.lang.Object
  • jdk.tools.jlink.internal.ImagePluginStack.LastPoolManager.LastModule
All Implemented Interfaces
jdk.tools.jlink.plugin.ResourcePoolModule

Field Summary

Modifier and TypeField and Description
pack-priv ModuleDescriptor
pack-priv final ResourcePoolModule
pack-priv ModuleTarget

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ModuleDescriptor
descriptor()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.descriptor.

The module descriptor of this module.

public Stream<ResourcePoolEntry>
entries()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.entries.

Retrieves the stream of ResourcePoolEntry.

public int
entryCount()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.entryCount.

Return the number of ResourcePoolEntry count in this ResourcePoolModule.

public Optional<ResourcePoolEntry>
findEntry(String path)

Implements jdk.tools.jlink.plugin.ResourcePoolModule.findEntry.

Retrieves a ResourcePoolEntry from the given path (e.g: /mymodule/com.foo.bar/MyClass.class)

private void
public String
public Set<String>
packages()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.packages.

Retrieves all the packages located in this module.

public String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

descriptorback to summary
pack-priv ModuleDescriptor descriptor
moduleback to summary
pack-priv final ResourcePoolModule module
targetback to summary
pack-priv ModuleTarget target

Constructor Detail

LastModuleback to summary
pack-priv LastModule(ResourcePoolModule module)

Method Detail

descriptorback to summary
public ModuleDescriptor descriptor()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.descriptor.

Doc from jdk.tools.jlink.plugin.ResourcePoolModule.descriptor.

The module descriptor of this module.

Annotations
@Override
entriesback to summary
public Stream<ResourcePoolEntry> entries()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.entries.

Doc from jdk.tools.jlink.plugin.ResourcePoolModule.entries.

Retrieves the stream of ResourcePoolEntry.

Annotations
@Override
entryCountback to summary
public int entryCount()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.entryCount.

Doc from jdk.tools.jlink.plugin.ResourcePoolModule.entryCount.

Return the number of ResourcePoolEntry count in this ResourcePoolModule.

Annotations
@Override
findEntryback to summary
public Optional<ResourcePoolEntry> findEntry(String path)

Implements jdk.tools.jlink.plugin.ResourcePoolModule.findEntry.

Doc from jdk.tools.jlink.plugin.ResourcePoolModule.findEntry.

Retrieves a ResourcePoolEntry from the given path (e.g: /mymodule/com.foo.bar/MyClass.class)

Annotations
@Override
initModuleAttributesback to summary
private void initModuleAttributes()
nameback to summary
public String name()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.name.

Doc from jdk.tools.jlink.plugin.ResourcePoolModule.name.

The module name.

Annotations
@Override
packagesback to summary
public Set<String> packages()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.packages.

Doc from jdk.tools.jlink.plugin.ResourcePoolModule.packages.

Retrieves all the packages located in this module.

Annotations
@Override
targetPlatformback to summary
public String targetPlatform()

Implements jdk.tools.jlink.plugin.ResourcePoolModule.targetPlatform.

Doc from jdk.tools.jlink.plugin.ResourcePoolModule.targetPlatform.

The target platform

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
jdk.tools.jlink.internal back to summary

public final Class ImagePluginStack.OrderedResourcePoolManager

extends ResourcePoolManager
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private final List<ResourcePoolEntry>
private final ResourcePoolManager.ResourcePoolImpl

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(ResourcePoolEntry
The Resource to add.
resource
)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.add.

Add a resource.

pack-priv List<ResourcePoolEntry>
public ResourcePool
Inherited from jdk.tools.jlink.internal.ResourcePoolManager:
byteOrdercontainsentriesentryCountfindEntryfindEntryInContextfindModulegetStringTableisEmptymoduleCountmodulesmoduleViewnewCompressedResourcereadModuleAttributesresourcePoolBuilder

Field Detail

orderedListback to summary
private final List<ResourcePoolEntry> orderedList
poolImplback to summary
private final ResourcePoolManager.ResourcePoolImpl poolImpl

Hides jdk.tools.jlink.internal.ResourcePoolManager.poolImpl.

Constructor Detail

OrderedResourcePoolManagerback to summary
public OrderedResourcePoolManager(ByteOrder order, StringTable table)

Method Detail

addback to summary
public void add(ResourcePoolEntry resource)

Overrides jdk.tools.jlink.internal.ResourcePoolManager.add.

Add a resource.

Parameters
resource:ResourcePoolEntry

The Resource to add.

Annotations
@Override
getOrderedListback to summary
pack-priv List<ResourcePoolEntry> getOrderedList()
resourcePoolback to summary
public ResourcePool resourcePool()

Overrides jdk.tools.jlink.internal.ResourcePoolManager.resourcePool.

Annotations
@Override
jdk.tools.jlink.internal back to summary

pack-priv Class ImagePluginStack.OrderedResourcePoolManager.OrderedResourcePool

extends ResourcePoolImpl
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Constructor Detail

OrderedResourcePoolback to summary
pack-priv OrderedResourcePool()

Method Detail

getOrderedListback to summary
pack-priv List<ResourcePoolEntry> getOrderedList()
jdk.tools.jlink.internal back to summary

private final Class ImagePluginStack.PreVisitStrings

extends Object
implements StringTable
Class Inheritance
All Implemented Interfaces
jdk.tools.jlink.internal.StringTable

Field Summary

Modifier and TypeField and Description
private int
private final Map<Integer, String>
private final Map<String, Integer>
private final Map<String, Integer>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
addString(String str)

Implements jdk.tools.jlink.internal.StringTable.addString.

Add a string to the jimage strings table.

private List<String>
public String
getString(int id)

Implements jdk.tools.jlink.internal.StringTable.getString.

Retrieve a string from the passed id.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentidback to summary
private int currentid
reverseMapback to summary
private final Map<Integer, String> reverseMap
stringsMapback to summary
private final Map<String, Integer> stringsMap
stringsUsageback to summary
private final Map<String, Integer> stringsUsage

Constructor Detail

PreVisitStringsback to summary
private PreVisitStrings()

Method Detail

addStringback to summary
public int addString(String str)

Implements jdk.tools.jlink.internal.StringTable.addString.

Doc from jdk.tools.jlink.internal.StringTable.addString.

Add a string to the jimage strings table.

Annotations
@Override
getSortedStringsback to summary
private List<String> getSortedStrings()
getStringback to summary
public String getString(int id)

Implements jdk.tools.jlink.internal.StringTable.getString.

Doc from jdk.tools.jlink.internal.StringTable.getString.

Retrieve a string from the passed id.

Annotations
@Override