code: public FieldInfo getDeclaredFieldInfo(final String fieldName) {
          if (!scanResult.scanSpec.enableFieldInfo) {
              throw new IllegalArgumentException("Please call ClassGraph#enableFieldInfo() before #scan()");
          }
          if (fieldInfo == null) {
              return null;
          }
          for (final FieldInfo fi : fieldInfo) {
              if (fi.getName().equals(fieldName)) {
                  return fi;
              }
          }
          return null;
      }
docs: Returns information on the named field declared by the class, but not by its superclasses. See also:
  
  <ul>
  <li>{@link #getFieldInfo(String)}
  <li>{@link #getFieldInfo()}
  <li>{@link #getDeclaredFieldInfo()}
  </ul>
  
  <p>
  Requires that {@link ClassGraph#enableFieldInfo()} be called before scanning, otherwise throws
  {@link IllegalArgumentException}.
  
  <p>
  By default only returns information for public fields, unless {@link ClassGraph#ignoreFieldVisibility()} was
  called before the scan.
  
  @param fieldName
  The field name.
  @return the {@link FieldInfo} object for the named field declared by this class, or null if the field was not
  found in this class (or is not visible).
  @throws IllegalArgumentException
  if {@link ClassGraph#enableFieldInfo()} was not called prior to initiating the scan.