title: Java: looping over clases
body: <p>Say I have a java method like:</p>
  <pre><code>  public boolean isTestRenewalRequired(int versionId, ReleaseVersion releaseVersion, Class&lt;?&gt; entityCls, int results) {
      Class&lt;?&gt;[] clases = {Test1.class, Test2.class, Test3.class, Test4.class};
      boolean hasResults = false;
      final CommonCriteriaQueryBuilder qBuilder = CommonCriteriaQueryBuilder.getInstance(crudService, entityCls);
      for (Class&lt;?&gt; c: clases) {
      if (ReleaseVersionStatusEnum.F.equals(releaseVersion.getStatus())) {
        c.equals(qBuilder);
        qBuilder.whereEqual(&quot;tempReleaseVersion&quot;, releaseVersion.getId().toString());      
      } else if (ReleaseVersionStatusEnum.W.equals(releaseVersion.getStatus())) {
        c.equals(qBuilder);
        qBuilder.whereEqual(&quot;releaseVersion&quot;, releaseVersion.getId().toString());
      }
        
        if (results &gt; 0) {
          hasResults = true;
        }
      }
      
      return hasResults;
    } 
  </code></pre>
  <p>The commoncriteriaquerybuilder allows me to compare two java classes tempReleaseVersion and ReleaseVersion. My question is how can I loop the java clases (Test1, Test2, Test3, Test4) over the if conditions?
  For c.equals(qBuilder) I got the following warning: Unlikely argument type for equals(): CommonCriteriaQueryBuilder seems to be unrelated to Class&lt;capture#6-of ?&gt; and Remove this call to &quot;equals&quot;; comparisons between unrelated types always return false.</p>
  <pre><code>public enum ReleaseVersionStatusEnum {
    W, // Wait for release / in work
    F, // Released for approval
    L, // Deleted / Rejected
  }
  
  </code></pre>
  <p>Could anybody help me and give me a hint?</p>