mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
Add support for incremental annotation processors in KAPT. These processors conform to https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing specification. Support is provided by using javac compiler APIs and recording the source file structure. At runtime, processors are instrumented with custom Filer that is used to keep track of generated files. In order to support classpath changes, stub generation task is used to generated a list of changed FQCNs, and this is simply used by KAPT. Both worker and non-worker mode are supported. #KT-23880
32 lines
795 B
Java
Vendored
32 lines
795 B
Java
Vendored
package test;
|
|
|
|
import java.lang.annotation.*;
|
|
import java.util.*;
|
|
import static java.lang.annotation.ElementType.*;
|
|
|
|
|
|
public class MyNumber extends @TypeUseAnnotation HashSet {
|
|
@FieldAnnotation
|
|
private String value;
|
|
|
|
@MethodAnnotation
|
|
private void getPrintedValue(@ParameterAnnotation String format) throws @ThrowTypeUseAnnotation RuntimeException{
|
|
}
|
|
|
|
private <@AnotherTypeUseAnnotation T extends Number> void accept(T visitor) {
|
|
}
|
|
}
|
|
|
|
@interface FieldAnnotation {}
|
|
@interface MethodAnnotation {}
|
|
@interface ParameterAnnotation {}
|
|
|
|
@Target(value={TYPE_PARAMETER, TYPE_USE})
|
|
@interface TypeUseAnnotation {}
|
|
|
|
@Target(value={TYPE_PARAMETER, TYPE_USE})
|
|
@interface AnotherTypeUseAnnotation {}
|
|
|
|
|
|
@Target(value={TYPE_PARAMETER, TYPE_USE})
|
|
@interface ThrowTypeUseAnnotation {} |