code: public static Field lookupField( Class parentClass, String fieldName )
      {
          try {
              return parentClass.getDeclaredField( fieldName );
          }
          catch ( NoSuchFieldException e ) {
              Class superClass = parentClass.getSuperclass();
              return superClass != null ? lookupField( superClass, fieldName ) : null;
          }
      }
docs: Get a Field in a Class.
  
  @param parentClass the Class in which to find the Field.
  @param fieldName the name of the Field.
  @return the Field with the given name, or <code>null</code> if the field does not exist.