I want to achieve one functionality so that if we annotate a method with
@Skip(type = Execution.TRUE)
then the method will not be executed. I have defined own annotation like.
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Skip {
Execution type() default Execution.FALSE;
}
and in the method definition i have defined like this way..
@Skip(type = Execution.TRUE)
static void show(){
System.ou.println("Hi");
}
now if we call show() method from main() method.
This method will not be executed. How i can achieve it?