Runtime Kit API1.0
All types

BuildPlan

Javarecordin example.runtimesince 1.0null-markedSourceruntime-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

public record BuildPlan(String mainClass, List<String> arguments)
Inheritance
  1. Object
  2. Record
  3. BuildPlan

Describes how to build a Java application as a native executable.

Pass this plan to a Planner.Local for validation against a Target. For example:

var plan = new BuildPlan("example.Main", List.of("-O2"));

Record components

mainClassnon-null (implied) by @NullMarked on package example.runtime
the fully qualified entry point
argumentsnon-null (implied) by @NullMarked on package example.runtime
compiler arguments in invocation order

Constructors1

public BuildPlan(String mainClass, List<String> arguments)

#Source

Creates a plan with a stable copy of the arguments.

Parameters

mainClassnon-null (implied) by @NullMarked on package example.runtime
the fully qualified entry point
argumentsnon-null (implied) by @NullMarked on package example.runtime
compiler arguments in invocation order

Methods6

public static BuildPlan defaults(String mainClass)

#Source

Returns a plan for the entry point using default compiler settings.

Parameters

mainClassnon-null (implied) by @NullMarked on package example.runtime
the fully qualified entry point

Returns

non-null (implied) by @NullMarked on package example.runtime
a plan with an empty argument list

public final String toString()

#

Returns a string containing the record class name and its component names and values.

Returns

non-null (implied) by @NullMarked on package example.runtime

Overrides toString().

public final int hashCode()

#

Returns a hash code computed from the record components.

Overrides hashCode().

public final boolean equals(Object o)

#

Returns whether the other object is a record of the same class with equal components.

Parameters

onullable (implied) by JSpecify’s rule for record equals(Object)
The object to compare with this record.

Overrides equals(java.lang.Object).

public String mainClass()

#

the fully qualified entry point

Returns

non-null (implied) by @NullMarked on package example.runtime

public List<String> arguments()

#

compiler arguments in invocation order

Returns

non-null (implied) by @NullMarked on package example.runtime

Inherited members