public JS get(JS key) throws JSExn {
String k = JSU.toString(key);
- try {
- Field f = this.getClass().getField(k);
- return wrap(f.get(this));
- } catch (NoSuchFieldException nfe) {
- } catch (IllegalAccessException nfe) {
- } catch (SecurityException nfe) { }
+ Class c = this.getClass();
+ while(c != null) {
+ try {
+ Field f = c.getField(k);
+ return wrap(f.get(this));
+ } catch (NoSuchFieldException nfe) {
+ } catch (IllegalAccessException nfe) {
+ } catch (SecurityException nfe) { }
+ c = c.getSuperclass();
+ }
try {
java.lang.reflect.Method[] methods = this.getClass().getMethods();