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