title: Getting all objects belonging to a class
body: <p>I come from a Ruby on Rails background and started doing some Android programming.</p>
  
  <p>I'm looking for a way to get a list of all objects in a class using Java.</p>
  
  <p>In Rails you can do something like Building.all  and it'll return an array of  all created buildings</p>
  
  <p>Is there something like that in Java? </p>
  
  <p>If so, can you post a little example that would return an array of building objects for a Building class?</p>