public boolean declaresField(Field field){
  try {
    type.getDeclaredField(field.getName());
    return true;
  }
 catch (  NoSuchFieldException e) {
    return false;
  }
}

public boolean declaresField ( Field field ) { try { type . getDeclaredField ( field . getName ( ) ) ; return true ; } catch ( NoSuchFieldException e ) { return false ; } }
determines whether t declares a field . this does not include inherited fields .
