Runtime Kit API1.0
All types

PlanCatalog

Javaclassin example.runtimesince 1.0null-markedsafe for concurrent useSourceruntime-kit.jar · Java 17 · bytecode 61.0runtime-kit.jar · Java 21 entry · Java 21 · bytecode 65.0runtime-kit.jmod · Java 17 · bytecode 61.0classes-21 (classes) · Java 21 · bytecode 65.0

@ThreadSafe
public final class PlanCatalog
Inheritance
  1. Object
  2. PlanCatalog

Looks up immutable build plans by name.

var catalog = new PlanCatalog(Map.of("app", BuildPlan.defaults("example.Main")));
var plan = catalog.find("app");

Fields1

public static final int FORMAT_VERSION

#Source

The catalog format version.

Value

Constant: 1

Constructors1

public PlanCatalog(Map<String, BuildPlan> plans)

#Source

Creates a catalog from a snapshot of the supplied plans.

Parameters

plansnon-null (implied) by @NullMarked on package example.runtime
the named plans to copy

Methods3

@HotPath public @Nullable BuildPlan find(String name)

Has an API note
#latency-sensitiveSource

Looks up the plan associated with a name.

Parameters

namenon-null (implied) by @NullMarked on package example.runtime
the catalog key

Returns

nullable
the matching plan, or null on a miss

API note

Use names() to list the available keys.

Implementation requirements

Lookup does not modify the catalog.

Implementation note

Keys are compared using String.equals(Object).

public List<@NonNull String> names()

#Source

Returns the available keys in sorted order.

Returns

non-null (implied) by @NullMarked on package example.runtime
the keys, which are non-null

@NullUnmarked @Deprecated(since = "1.0", forRemoval = true) public BuildPlan lookup(String name)

for removal
#null-unmarkedSource

Deprecated for removal since 1.0

Use find(String) for an explicit nullness contract.

Returns a plan through the legacy lookup contract.

Parameters

name
the catalog key

Returns

the lookup result

Inherited members