title: Java Entity Table Model
body: <p>I want to make a table model which stores entities via a list. Like this;</p>
  
  <pre><code>List list = new ArrayList&lt;Entity&gt;();
  list.add(entity);
  tableModel.setEntityVector(list);
  </code></pre>
  
  <p>in the Entity Table Model which extends AbstractTableModel the method getValueAt(int row, int column) should return the value of entity fields according to the row and column values. row represent entity number in the list and the column represent the field number in the entity object. But the problem is that when i use the following code; </p>
  
  <pre><code>Entity entity = list.get(rowCount - 1);
  Field[] fields = entity.getClass().getDeclaredFields();
  </code></pre>
  
  <p>i cant reach fields of the object becouse entity fields must be private. And if i had used getDeclaredMethods() instead of getDeclaredFields() method then i could not reached the method that i want, using column parameter becouse of there are constructors, setters...</p>
  
  <p>My question is that; how can i reach an entity's field values using column parameter of getValueAt(int row, int column) method of AbstractTableModel</p>