mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
17 lines
499 B
Java
17 lines
499 B
Java
// "Annotate annotation 'Test' as '@Retention(RetentionPolicy.RUNTIME)'" "true-preview"
|
|
import java.lang.annotation.ElementType;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.lang.annotation.Target;
|
|
import java.lang.reflect.Method;
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
@Target(ElementType.METHOD)
|
|
@interface Test {
|
|
}
|
|
|
|
class Main {
|
|
private static boolean hasTestAnnotation(Method method) {
|
|
return method.getAnnotation(Test.class) != null;
|
|
}
|
|
} |