Files
2022-08-04 13:39:06 +00:00

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;
}
}