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
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
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
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
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 :
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
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
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:
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 :
I used addCatch as follows:
=
for (int i = 0; i allMethods.length; i++) {
CtMethod method = allMethods;
if (method.getName().startsWith(set)) {
StringBuffer insCode =
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();
11 matches
Mail list logo