code: public static FieldDeclaration getFieldDeclaration(TypeDeclaration type, String fieldName)
              throws FieldDeclarationNotFoundException {
          requireNonNull(type, "type declaration");
          requireNonNull(fieldName, "field name");
  
          for (FieldDeclaration field : type.getFields()) {
              for (Object fragObj : field.fragments()) {
                  VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragObj;
                  if (fieldName.equals(fragment.getName().getIdentifier())) {
                      return field;
                  }
              }
          }
  
          throw new FieldDeclarationNotFoundException(type, fieldName);
      }
docs: Returns the <CODE>FieldDeclaration</CODE> for the specified field name.
  The field has to be declared in the specified
  <CODE>TypeDeclaration</CODE>.
  
  @param type
  The <CODE>TypeDeclaration</CODE>, where the
  <CODE>FieldDeclaration</CODE> is declared in.
  @param fieldName
  The simple field name to search for.
  @return the <CODE>FieldDeclaration</CODE> found in the specified
  <CODE>TypeDeclaration</CODE>.
  @throws FieldDeclarationNotFoundException
  if no matching <CODE>FieldDeclaration</CODE> was found.