i am debugging a application using OSGi, i terribly find out that if the Annotation class is missing, the class loader would omit that annotation, if i call the method.getAnnotations(), no exception, but return nothing.
i don't get it, but i do want to know if there is any way to make the JVM throw a Exception. is there any option for starting the JVM?
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Before
public @interface Secured {
/** Priority **/ public int order() default 0;
/** Mapping **/ public String value() default "profile/validate";
/** Required **/ public boolean required() default true;
public String role() default "L1";
}
Thanks.