[JBoss-user] [Javassist user questions] - Re: Why is there no LocalVarAccess just like FieldAccess Exp

2005-03-09 Thread rezahay
Thank you Mr. Chiba for your response. I have another question which is almost the same as my previous question. Why is there no Expr class for logical-expressions, arithmetic-expressions, and things like them? I want to analyse a code-line (as a Abstract Syntax Tree) to see what kind

[JBoss-user] [Javassist user questions] - Why is there no LocalVarAccess just like FieldAccess Expr?

2005-03-04 Thread rezahay
Hi, I use javassist Expr classes (for example FieldAccess) to construct a model of the running java class. It would be very fine if there was a javassist LocalVarAccess (just like FieldAccess) in order to get information about the local-variables of a method (and hence about the behavior of

[JBoss-user] [Javassist user questions] - Has somebody used javassist to perform Data Flow Analysis?

2005-02-22 Thread rezahay
Hello there, I'm looking for pice of code which uses javassist to perform Data Flow Analysis on Java Byte Code. I want to use that for an academic project relating self-management (self-healing). If nobody has such a code I want to write it by myself. But the question is whether it is

[JBoss-user] [Javassist user questions] - Re: Can I get info about containing object of some methodCal

2005-02-17 Thread rezahay
Hi, Thank you for your response. But it doesn't solve my problem. As you can see from my previous mailing, I have already used ExprEditor to get information about someMethod in the following method-call expression: .. someObj.someMethod .. But

[JBoss-user] [Javassist user questions] - Re: Can I get info about containing object of some methodCal

2005-02-08 Thread rezahay
You are absolutely right. I want actually static information about someObj, like object-type, ... . Would you please tell me how I can get this information? Thanks View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3865685#3865685 Reply to the post :

[JBoss-user] [Javassist user questions] - Can javassist make a CtClass from a serialized object?

2004-12-23 Thread rezahay
I'm sorry if this question has already been asked. I need at runtime to serialize a running object (I have to keep the state of the object) and make a CtClass from the serialized object and make some changes to it and load the new modified class. Is this possible with javassist? Thanks in

[JBoss-user] [Javassist user questions] - Can I get info about containing object of some methodCall?

2004-12-17 Thread rezahay
Hello, Suppose I have the following MethodCall expr: .. someObj.someMethod .. If I use: curMethod.instrument(new ExprEditor() public void edit(MethodCall m) throws CannotCompileException { ... then I can get information about the

[JBoss-user] [Javassist user questions] - Re: addCatch doesn't work

2004-12-10 Thread rezahay
Thank you very, chiba for your response. I used {return;} and it works. But if there are methods with non-void return types then {return;} is not enough. Therefore I used (within my addCatch) {Object result; return ($r)result;}. But I get the following javassist compiler error:

[JBoss-user] [Javassist user questions] - Re: javassist-3.0RC1: replace({}) doesn't work.

2004-12-09 Thread rezahay
I'm sorry. I don't understand your answer. I try to say that replace({}) doesn't work with javassist-3.0RC1. Which release should I use? Thanks. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3857992#3857992 Reply to the post :

[JBoss-user] [Javassist user questions] - addCatch doesn't work

2004-12-09 Thread rezahay
I used addCatch as follows: = for (int i = 0; i allMethods.length; i++) { CtMethod method = allMethods; if (method.getName().startsWith(set)) { StringBuffer insCode =

[JBoss-user] [Javassist user questions] - javassist-3.0RC1: replace(

2004-12-03 Thread rezahay
Hello, I have tried the following code, based on the tutorial: = public class Test { public static void main(String[] args) throws Exception { ClassPool pool = ClassPool.getDefault();