private static Field findAccessibleField(Class clas,String fieldName) throws UtilEvalError, NoSuchFieldException {
  Field field;
  try {
    field=clas.getField(fieldName);
    ReflectManager.RMSetAccessible(field);
    return field;
  }
 catch (  NoSuchFieldException e) {
  }
  while (clas != null) {
    try {
      field=clas.getDeclaredField(fieldName);
      ReflectManager.RMSetAccessible(field);
      return field;
    }
 catch (    NoSuchFieldException e) {
    }
    clas=clas.getSuperclass();
  }
  throw new NoSuchFieldException(fieldName);
}

private static Field findAccessibleField ( Class clas , String fieldName ) throws UtilEvalError , NoSuchFieldException { Field field ; try { field = clas . getField ( fieldName ) ; ReflectManager . RMSetAccessible ( field ) ; return field ; } catch ( NoSuchFieldException e ) { } while ( clas != null ) { try { field = clas . getDeclaredField ( fieldName ) ; ReflectManager . RMSetAccessible ( field ) ; return field ; } catch ( NoSuchFieldException e ) { } clas = clas . getSuperclass ( ) ; } throw new NoSuchFieldException ( fieldName ) ; }
used when accessibility capability is available to locate an occurrence of the field in the most derived class or superclass and set its accessibility flag . note that this method is not needed in the simple non accessible case because we don ' t have to hunt for fields . note that classes may declare overlapping private fields , so the distinction about the most derived is important . java doesn ' t normally allow this kind of access ( super won ' t show private variables ) so there is no real syntax for specifying which class scope to use . . .
