code: private Field[] getFields(final Class<?> currentClass) {
          final Field[] objectFields = AccessController.doPrivileged(new PrivilegedAction<Field[]>() {
              @Override
              public Field[] run() {
                  try {
                      Field[] tempObjectFields = currentClass.getDeclaredFields();
                      if (tempObjectFields.length != 0) {
                          AccessibleObject.setAccessible(tempObjectFields, true);
                      }
                      return tempObjectFields;
                  } catch (Throwable t) {
                      // Introspection of field failed
                      StringWriter sw = new StringWriter();
                      PrintWriter pw = new PrintWriter(sw);
                      t.printStackTrace(pw);
                      addNewChild("Failed to resolve fields for " + currentClass.getName(), sw.toString());
                  }
                  return new Field[0];
              }
          });
          return objectFields;
      }
docs: Return the fields in a particular class
  
  @param currentClass
  The class to be introspected
  @return the fields of the class