I used the CtClass.getMethods for finding the getResourceAsStream() method,
Unfortunately, the getResourceAsStream() method was not found in my test class
file. because the getResourceAsStream() method is not the method declared in my
class file, it's called by the java/lang/class.
My test code:
public class TestGetRes{
public void load(){
DataInputStream dis = new
DataInputStream(getClass().getResourceAsStream("/file"));
}
}
I can use the getMethod() method for finding the load() method, but I don't
know how to fine the getResourceAsStream() method, so I can't use the
ExprEditor to repalce this method.
the result expects after the correct replacement:
public class TestGetRes{
public void load(){
DataInputStream dis = new
DataInputStream(MyUtil.getResourceAsStream(getClass(), "/file"));
}
}
thanks a lot.
online waiting.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861857#3861857
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861857
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user