title: How to get Java reflect to spot fields in the super class? not just the actual class
body: <p>I've recently changed my schema a bit so my classes inherit from a super class, problem is my comparison method which generates an audit log, using Java reflect, is now only looping through the fields of the child class, not the superclass, is there a way to get all the FIELDS? or do I need to cast it into the super class.....?</p>
  
  <p>Heres my method below:</p>
  
  <pre><code>public static &lt;T&gt; String GenerateChangeLogForEntity(T old, T updated) {
          String text = "";
          try {
              Field[] fields = old.getClass().getDeclaredFields();
              if(fields != null) {
                  BaseController.getLogger().info("Z1 num fields:"+fields.length);
                  for (Field field : fields) {
                      if(field.isAnnotationPresent(Column.class)) {
                          String fieldName = field.getName();
                          BaseController.getLogger().info(field.getName());
                          if(field.isAnnotationPresent(Variation.class)) {
                              Variation v = field.getAnnotation(Variation.class);
                              fieldName = v.friendlyName();
                          }
                          field.setAccessible(true);
                          if(field.get(old) != null &amp;&amp; field.get(updated) != null) {
                              if(!(field.get(old)).equals(field.get(updated))) {
                                  text += "&lt;p&gt;&lt;span class=\"field-name\"&gt;"+fieldName+"&lt;/span&gt; changed from: &lt;strong&gt;"+GetFriendlyFieldValueForChangeLog(field.get(old))+"&lt;/strong&gt;  to: &lt;strong&gt;"+GetFriendlyFieldValueForChangeLog(field.get(updated)) + "&lt;/strong&gt;&lt;/p&gt;";
                              }
                          }
                          if(field.get(old) == null &amp;&amp; field.get(updated) != null) {
                              text += "&lt;p&gt;&lt;span class=\"field-name\"&gt;"+fieldName+"&lt;/span&gt; changed from: &lt;strong&gt;empty&lt;/strong&gt; to: &lt;strong&gt;"+GetFriendlyFieldValueForChangeLog(field.get(updated)) + "&lt;/strong&gt;&lt;/p&gt;";
                          }
                          if(field.get(old) != null &amp;&amp; field.get(updated) == null) {
                              text += "&lt;p&gt;&lt;span class=\"field-name\"&gt;"+fieldName+"&lt;/span&gt; changed from: &lt;strong&gt;"+GetFriendlyFieldValueForChangeLog(field.get(updated))+"&lt;/strong&gt; to &lt;strong&gt;empty&lt;/strong&gt;" + "&lt;/p&gt;";
                          }
                          field.setAccessible(false);
                      }
                  }
              }
          } catch(IllegalAccessException e) {}
          return text;
      }
  </code></pre>