title: How can i iterate all member of a dto in java?
body: <p>I have a problem about basic java. I have a class which it has lots of bigdecimal members.
  I want to iterate all members of this class via a loop. Is there any way for this?</p>
  
  <pre><code>public class LargeDTO extends CoreDTO {
      private BigDecimal price1;
      private BigDecimal price2;
      private BigDecimal price3;
      private BigDecimal price4;
      private BigDecimal price5;
      private BigDecimal price6;
      ...
      // getter &amp; setter
  }
  
  public class UseLoop{
      LargeDTO largeDTO = fillLatgeDTO();
      BigDecimal total = BigDecimal.Zero;
      // Is it possible ?
      for(each member of largeDTO){
           total = total.add(largeDTO.getCurrentMember()); // price1, price2...
      }
  }
  </code></pre>