[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
adding exceptions to methods
Hi, I'm having trouble adding exceptions to methods.
I'm trying to copy a method from one class to another. This is what I
do:
newMethod = new SootMethod(oldMethod.getName(),....,
oldMethod.getExceptions());
...
Iterator it = newclass.getMethods().iterator();
while(it.hasNext()){
SootMethod m = (SootMethod)it.next();
System.out.println(m+ " has except" + m.getExceptions());
}
newclass.write();
When run on a test class, this is what it prints:
<test: void <init>()> has except[]
<test: void <init>(int)> has except[java.lang.Exception]
However, the jimple file for test.class shows no exception
declarations. Any ideas why this may be happening?
--
Anup Rao arao@resnet.gatech.edu
MATH/CS |----------------------
Georgia Tech |Candy is dandy, But liquor is quicker -- Ogden Nash
|