title: Is there a way to find if a Field is boolean the same as isPrimitive()?
body: <p>Is there a way to find if a Field is <code>boolean</code> in Java reflection the same as <code>isPrimitive()</code>?</p>
  
  <pre><code>Field fieldlist[] = clazz.getDeclaredFields();
  for (int i = 0; fieldlist.length &amp; gt; i; i++) {
   Field fld = fieldlist[i];
   if (fld.getClass().isPrimitive()) {
    fld.setInt(object, 0);
    continue;
   }
  }
  </code></pre>