title: Pass dynamic parameters to an annotation in java
body: <p>I have a custom annotation which is declared as below and have some implementation for this.</p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.METHOD)
  public @interface SampleTestCase {
      public int caseID() default -1;
      public int suiteId() default -1;
  }
  </code></pre>
  
  <p>Now, I am trying to use this annotation and trying to send runtime parameters to it.</p>
  
  <pre><code>ConfigHelper config = new ConfigHelper();
  int caseId = config.getTestCaseID();
  
  @SampleTestCase(caseID=caseId,suiteId="Test")
  public void testCaseOne(){
      Assert.assertTrue(true);
  }
  </code></pre>
  
  <p>Getting an error as "The value for annotation attribute TivoTestCase.caseID must be a constant expression".</p>
  
  <p>Is there any way to pass dynamic parameters to an annotation other than this way??</p>