---
title: "Planner"
description: "Validates a BuildPlan before handing it to a BuildStep."
kind: "sealed abstract class"
id: "example.runtime.Planner"
module: "runtime-kit"
version: "1.0"
---

# Planner

## API at a glance

- target(): Identifies the runtime for prepared plans. Returns the selected target
- prepare(BuildPlan): Validates that the plan names an entry point. Returns the validated plan Throws PlanException when the entry point is blank

[runtime-kit](../../index.md) › [example.runtime](index.md) · Every page: [llms.txt](../../llms.txt)

Sealed abstract class in [`example.runtime`](index.md). Since 1.0.

```java
public abstract sealed class Planner implements BuildStep<BuildPlan> permits Planner.Local
```

Inheritance: `Object` > `Planner`

Implements: [`BuildStep`](BuildStep.md)`<`[`BuildPlan`](BuildPlan.md)`>`

Permitted subtypes: [`Planner.Local`](Planner.Local.md)

Validates a [`BuildPlan`](BuildPlan.md) before handing it to a [`BuildStep`](BuildStep.md). Select a [`Target`](Target.md) and call [`prepare(BuildPlan)`](Planner.md#prepare%28example.runtime.BuildPlan%29) to check the entry point.

**See also**

- [`Planner.Options`](Planner.Options.md)

## Nested types

- [`Planner.Local`](Planner.Local.md) (class): Prepares builds against a locally installed toolchain.
- [`Planner.Options`](Planner.Options.md) (record): Configuration for Local, including how to report progress.

## Methods

### target()

```java
public abstract Target target()
```

Identifies the runtime for prepared plans.

**Returns** [`Target`](Target.md): the selected target

### prepare(BuildPlan)

```java
public BuildPlan prepare(BuildPlan plan) throws PlanException
```

Validates that the plan names an entry point.

**Parameters**

- `plan` [`BuildPlan`](BuildPlan.md): configuration to validate

**Returns** [`BuildPlan`](BuildPlan.md): the validated plan

**Throws**

- [`PlanException`](PlanException.md): when the entry point is blank

Overrides [`prepare()`](BuildStep.md#prepare%28example.runtime.BuildPlan%29).

## Inherited members

- From class `Object`: `equals`, `getClass`, `hashCode`, `notify`, `notifyAll`, `toString`, `wait`, `wait`, `wait`
