Package org.springframework.context.aot

# Class AbstractAotProcessor<T>

java.lang.Object
org.springframework.context.aot.AbstractAotProcessor<T>

Type Parameters:
  `T` - the type of the processing result

Direct Known Subclasses:
  `ContextAotProcessor`

public abstract class AbstractAotProcessor<T> extends Object
Abstract base class for filesystem-based ahead-of-time (AOT) processing.

Concrete implementations should override `doProcess()` that kicks off the optimization of the target, usually an application.

Since:
  6.0
Author:
  Stephane Nicoll, Andy Wilkinson, Phillip Webb, Sam Brannen
See Also:
  - `FileSystemGeneratedFiles`
  - `FileNativeConfigurationWriter`
  - `ContextAotProcessor`
  - `org.springframework.test.context.aot.TestAotProcessor`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`AbstractAotProcessor.Settings`
Common settings for AOT processors.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`AOT_PROCESSING`
The name of a system property that is made available when the processor runs.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractAotProcessor(AbstractAotProcessor.Settings settings)`
Create a new processor instance with the supplied settings.

## Method Summary

Modifier and Type
Method
Description
`protected org.springframework.aot.generate.FileSystemGeneratedFiles`
`createFileSystemGeneratedFiles()`
`protected void`
`deleteExistingOutput()`
Delete the source, resource, and class output directories.
`protected abstract T`
`doProcess()`
`protected AbstractAotProcessor.Settings`
`getSettings()`
Get the settings for this AOT processor.
`final T`
`process()`
Run AOT processing.
`protected void`
`writeHints(org.springframework.aot.hint.RuntimeHints hints)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### AOT_PROCESSING

public static final String AOT_PROCESSING
The name of a system property that is made available when the processor runs.

Since:
  6.2
See Also:
  - `doProcess()`
  - Constant Field Values

## Constructor Details

### AbstractAotProcessor

protected AbstractAotProcessor(AbstractAotProcessor.Settings settings)
Create a new processor instance with the supplied settings.

See Also:
  - `AbstractAotProcessor.Settings.builder()`

## Method Details

### getSettings

protected AbstractAotProcessor.Settings getSettings()
Get the settings for this AOT processor.

### process

public final T process()
Run AOT processing.

Returns:
  the result of the processing.

### doProcess

protected abstract T doProcess()

### deleteExistingOutput

protected void deleteExistingOutput()
Delete the source, resource, and class output directories.

### createFileSystemGeneratedFiles

protected org.springframework.aot.generate.FileSystemGeneratedFiles createFileSystemGeneratedFiles()

### writeHints

protected void writeHints(org.springframework.aot.hint.RuntimeHints hints)