AnnotationProcessorOptions

public interface AnnotationProcessorOptions


Options for configuring Java annotation processor.

Summary

Public methods

abstract void

Adds an argument that represent primitive types for annotation processors.

abstract void

Adds arguments that represent primitive types for annotation processors.

abstract void
className(@NonNull String className)

Adds an annotation processor class to run.

abstract void
classNames(@NonNull String classNames)

Adds annotation processor classes to run.

abstract void

Adds an argument for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

abstract void

Adds arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

abstract @NonNull Map<@NonNull String, @NonNull String>

Specifies arguments that represent primitive types for annotation processors.

abstract @NonNull List<@NonNull String>

Specifies the annotation processor classes to run.

abstract @NonNull List<@NonNull CommandLineArgumentProvider>

Specifies arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

Public methods

argument

abstract void argument(@NonNull String key, @NonNull String value)

Adds an argument that represent primitive types for annotation processors.

If one or more arguments represent files or directories, you must instead use compilerArgumentProviders.

arguments

abstract void arguments(@NonNull Map<@NonNull String, @NonNull String> arguments)

Adds arguments that represent primitive types for annotation processors.

If one or more arguments represent files or directories, you must instead use compilerArgumentProviders.

className

abstract void className(@NonNull String className)

Adds an annotation processor class to run.

By default, this property is empty and the plugin automatically discovers and runs annotation processors that you add to the annotation processor classpath. To learn more about adding annotation processor dependencies to your project, read Add annotation processors.

classNames

abstract void classNames(@NonNull String classNames)

Adds annotation processor classes to run.

By default, this property is empty and the plugin automatically discovers and runs annotation processors that you add to the annotation processor classpath. To learn more about adding annotation processor dependencies to your project, read Add annotation processors.

compilerArgumentProvider

abstract void compilerArgumentProvider(
    @NonNull CommandLineArgumentProvider compilerArgumentProvider
)

Adds an argument for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

The benefit of using this class is that it allows you or the annotation processor author to improve the correctness and performance of incremental and cached clean builds by applying incremental build property type annotations.

To learn more about how to use this class to annotate arguments for annotation processors and pass them to the Android plugin, read Pass arguments to annotation processors.

compilerArgumentProviders

abstract void compilerArgumentProviders(
    @NonNull CommandLineArgumentProvider compilerArgumentProviders
)

Adds arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

The benefit of using this class is that it allows you or the annotation processor author to improve the correctness and performance of incremental and cached clean builds by applying incremental build property type annotations.

To learn more about how to use this class to annotate arguments for annotation processors and pass them to the Android plugin, read Pass arguments to annotation processors.

getArguments

abstract @NonNull Map<@NonNull String, @NonNull StringgetArguments()

Specifies arguments that represent primitive types for annotation processors.

If one or more arguments represent files or directories, you must instead use compilerArgumentProviders.

getClassNames

abstract @NonNull List<@NonNull StringgetClassNames()

Specifies the annotation processor classes to run.

By default, this property is empty and the plugin automatically discovers and runs annotation processors that you add to the annotation processor classpath. To learn more about adding annotation processor dependencies to your project, read Add annotation processors.

getCompilerArgumentProviders

abstract @NonNull List<@NonNull CommandLineArgumentProvidergetCompilerArgumentProviders()

Specifies arguments for annotation processors that you want to pass to the Android plugin using the CommandLineArgumentProvider class.

The benefit of using this class is that it allows you or the annotation processor author to improve the correctness and performance of incremental and cached clean builds by applying incremental build property type annotations.

To learn more about how to use this class to annotate arguments for annotation processors and pass them to the Android plugin, read Pass arguments to annotation processors.