I wrote this example to help understand how a scuffman responds.
import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Method; import java.util.Arrays; class Test { @Retention(RetentionPolicy.RUNTIME) public @interface Foo { } @Foo public static void main(String... args) throws SecurityException, NoSuchMethodException { final Method mainMethod = Test.class.getDeclaredMethod("main", String[].class);
source share