title: Java: Get all Objects in Class
body: <p>I have a class that looks like this:</p>
  
  <pre><code>public class Items {
      String uselessText;
      public static final Item COW = new Item("text", 0);
      public static final Item CAT = new Item("abc", 1);
      public static final Item DOG= new Item("wow", 2);
          ...SO on
  
      public void search(String search) {
            for(every Item in this Class) {
                if(item.textString == "abc") {
                   //DO SOMETHING
                }
            }
  
          }
  </code></pre>
  
  <p>Is this possible? And no thanks I do not want to do an Array (because I have over 100 Item and I want them static access)</p>
  
  <p>Any idea?</p>
  
  <p>Cheers</p>