00001 package gov.nasa.arc.ase.jpf.jvm.reflection;
00002
00003 import gov.nasa.arc.ase.jpf.jvm.*;
00004 import gov.nasa.arc.ase.jpf.jvm.reflection.*;
00005 import de.fub.bytecode.generic.InstructionHandle;
00006
00007 public class JavaLangThrowableReflection extends Reflection {
00008 public InstructionHandle executeMethod(MethodInfo mi, boolean atomic) {
00009 String name = mi.getFullName();
00010
00011 if(name.equals("java.lang.Throwable.fillInStackTrace()Ljava/lang/Throwable;")) {
00012 return exitRef(-1);
00013 }
00014
00015 if(name.equals("java.lang.Throwable.printStackTrace0(Ljava/lang/Object;)V")) {
00016
00017 throw new NativeMethodException("java.lang.Throwable.printStackTrace0(Ljava/lang/Object;)V");
00018 }
00019
00020 return super.executeMethod(mi, atomic);
00021 }
00022 public boolean isMethodDeterministic(MethodInfo mi) {
00023 String name = mi.getFullName();
00024
00025 if(name.equals("java.lang.Throwable.printStackTrace0(Ljava/lang/Object;)V")) {
00026
00027 throw new NativeMethodException("java.lang.Throwable.printStackTrace0(Ljava/lang/Object;)V");
00028 }
00029
00030 return super.isMethodDeterministic(mi);
00031 }
00032 public boolean isMethodExecutable(MethodInfo mi) {
00033 String name = mi.getFullName();
00034
00035 if(name.equals("java.lang.Throwable.printStackTrace0(Ljava/lang/Object;)V")) {
00036
00037 throw new NativeMethodException("java.lang.Throwable.printStackTrace0(Ljava/lang/Object;)V");
00038 }
00039
00040 return super.isMethodExecutable(mi);
00041 }
00042 }