Top Description Methods
jdk.tools.jlink.plugin

public Interface ResourcePool

Known Direct Implementers
jdk.tools.jlink.internal.ResourcePoolManager.ResourcePoolImpl
Imports
java.nio.ByteOrder, java.util.Optional, java.util.function.Function, java.util.stream.Stream

A Pool of Java resources.

Method Summary

Modifier and TypeMethod and Description
public ByteOrder

Returns:

The ByteOrder.
byteOrder
()

The ByteOrder currently in use when generating the jimage file.

public boolean

Returns:

The module data or null if not found.
contains
(ResourcePoolEntry
The module data to check existence for.
data
)

Check if the ResourcePool contains the given ResourcePoolEntry.

public Stream<ResourcePoolEntry>

Returns:

The stream of ResourcePoolEntries.
entries
()

Get all ResourcePoolEntry contained in this ResourcePool instance.

public int

Returns:

the entry count.
entryCount
()

Return the number of ResourcePoolEntry count in this ResourcePool.

public Optional<ResourcePoolEntry>

Returns:

A ResourcePoolEntry instance or null if the data is not found
findEntry
(String
A data path
path
)

Get the ResourcePoolEntry for the passed path.

public Optional<ResourcePoolEntry>

Returns:

A ModuleEntry instance or null if the data is not found
findEntryInContext
(String
A data path
path
,
ResourcePoolEntry
A context of the search
context
)

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

public boolean

Returns:

True, no content, false otherwise.
isEmpty
()

Check if the ResourcePool contains some content at all.

public ResourcePoolModuleView

Returns:

a module based view of this resource pool.
moduleView
()

Return the module view of this resource pool.

public default void
transformAndCopy(Function<ResourcePoolEntry, ResourcePoolEntry>
The function called for each ResourcePoolEntry found in the ResourcePool. The transform function should return a ResourcePoolEntry instance which will be added to the output or it should return null if the passed ResourcePoolEntry is to be ignored for the output.
transform
,
ResourcePoolBuilder
The ResourcePoolBuilder to be filled with Visitor returned ResourcePoolEntries.
outBuilder
)

Visit each ResourcePoolEntry in this ResourcePool to transform it and copy the transformed ResourcePoolEntry to the output ResourcePoolBuilder.

Method Detail

byteOrderback to summary
public ByteOrder byteOrder()

The ByteOrder currently in use when generating the jimage file.

Returns:ByteOrder

The ByteOrder.

containsback to summary
public boolean contains(ResourcePoolEntry data)

Check if the ResourcePool contains the given ResourcePoolEntry.

Parameters
data:ResourcePoolEntry

The module data to check existence for.

Returns:boolean

The module data or null if not found.

entriesback to summary
public Stream<ResourcePoolEntry> entries()

Get all ResourcePoolEntry contained in this ResourcePool instance.

Returns:Stream<ResourcePoolEntry>

The stream of ResourcePoolEntries.

entryCountback to summary
public int entryCount()

Return the number of ResourcePoolEntry count in this ResourcePool.

Returns:int

the entry count.

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

Get the ResourcePoolEntry for the passed path.

Parameters
path:String

A data path

Returns:Optional<ResourcePoolEntry>

A ResourcePoolEntry instance or null if the data is not found

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

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

Parameters
path:String

A data path

context:ResourcePoolEntry

A context of the search

Returns:Optional<ResourcePoolEntry>

A ModuleEntry instance or null if the data is not found

isEmptyback to summary
public boolean isEmpty()

Check if the ResourcePool contains some content at all.

Returns:boolean

True, no content, false otherwise.

moduleViewback to summary
public ResourcePoolModuleView moduleView()

Return the module view of this resource pool.

Returns:ResourcePoolModuleView

a module based view of this resource pool.

transformAndCopyback to summary
public default void transformAndCopy(Function<ResourcePoolEntry, ResourcePoolEntry> transform, ResourcePoolBuilder outBuilder)

Visit each ResourcePoolEntry in this ResourcePool to transform it and copy the transformed ResourcePoolEntry to the output ResourcePoolBuilder.

Parameters
transform:Function<ResourcePoolEntry, ResourcePoolEntry>

The function called for each ResourcePoolEntry found in the ResourcePool. The transform function should return a ResourcePoolEntry instance which will be added to the output or it should return null if the passed ResourcePoolEntry is to be ignored for the output.

outBuilder:ResourcePoolBuilder

The ResourcePoolBuilder to be filled with Visitor returned ResourcePoolEntries.