625 }
626 }
627
628 public void doCInt(CIntField field, boolean isVMField) {
629 throw new RuntimeException("should not reach here!");
630 }
631 }
632
633 public Class readClass(InstanceKlass kls) throws ClassNotFoundException {
634 Class cls = (Class) getFromObjTable(kls);
635 if (cls == null) {
636 cls = Class.forName(kls.getName().asString().replace('/', '.'), true, cl);
637 putIntoObjTable(kls, cls);
638 }
639 return cls;
640 }
641
642 public Object readMethodOrConstructor(sun.jvm.hotspot.oops.Method m)
643 throws NoSuchMethodException, ClassNotFoundException {
644 String name = m.getName().asString();
645 if (name.equals("<init>")) {
646 return readConstructor(m);
647 } else {
648 return readMethod(m);
649 }
650 }
651
652 public java.lang.reflect.Method readMethod(sun.jvm.hotspot.oops.Method m)
653 throws NoSuchMethodException, ClassNotFoundException {
654 java.lang.reflect.Method result = (java.lang.reflect.Method) getFromObjTable(m);
655 if (result == null) {
656 Class<?> clz = readClass(m.getMethodHolder());
657 String name = m.getName().asString();
658 Class[] paramTypes = getParamTypes(m.getSignature());
659 result = clz.getMethod(name, paramTypes);
660 putIntoObjTable(m, result);
661 }
662 return result;
663 }
664
665 public java.lang.reflect.Constructor readConstructor(sun.jvm.hotspot.oops.Method m)
|
625 }
626 }
627
628 public void doCInt(CIntField field, boolean isVMField) {
629 throw new RuntimeException("should not reach here!");
630 }
631 }
632
633 public Class readClass(InstanceKlass kls) throws ClassNotFoundException {
634 Class cls = (Class) getFromObjTable(kls);
635 if (cls == null) {
636 cls = Class.forName(kls.getName().asString().replace('/', '.'), true, cl);
637 putIntoObjTable(kls, cls);
638 }
639 return cls;
640 }
641
642 public Object readMethodOrConstructor(sun.jvm.hotspot.oops.Method m)
643 throws NoSuchMethodException, ClassNotFoundException {
644 String name = m.getName().asString();
645 if (name.equals("<init>") || name.equals("<vnew>")) {
646 return readConstructor(m);
647 } else {
648 return readMethod(m);
649 }
650 }
651
652 public java.lang.reflect.Method readMethod(sun.jvm.hotspot.oops.Method m)
653 throws NoSuchMethodException, ClassNotFoundException {
654 java.lang.reflect.Method result = (java.lang.reflect.Method) getFromObjTable(m);
655 if (result == null) {
656 Class<?> clz = readClass(m.getMethodHolder());
657 String name = m.getName().asString();
658 Class[] paramTypes = getParamTypes(m.getSignature());
659 result = clz.getMethod(name, paramTypes);
660 putIntoObjTable(m, result);
661 }
662 return result;
663 }
664
665 public java.lang.reflect.Constructor readConstructor(sun.jvm.hotspot.oops.Method m)
|