code: protected static Invocable resolveExpectedJavaField(
              Class<?> clas, String fieldName, boolean staticOnly)
              throws UtilEvalError, ReflectError {
          Invocable field = BshClassManager.memberCache
                  .get(clas).findField(fieldName);
  
          if (null == field)
              throw new ReflectError("No such field: "
                      + fieldName + " for class: " + clas.getName());
  
          if ( staticOnly && !field.isStatic() )
              throw new UtilEvalError(
                  "Can't reach instance field: " + fieldName
                + " from static context: " + clas.getName() );
  
          return field;
      }
docs: /*
  Note: this should really just throw NoSuchFieldException... need
  to change related signatures and code.