Log in to follow, share, and participate in this community.
Thread Instrumenting SQL execution times (Statement and PreparedSta
Instrumenting SQL execution times (Statement and PreparedStaHello, Does anyone have any clues as to how its possible to instrument JDBC SQL query times ? I have successfully been able to instrument other classes, but I am unable to find the class that actually executes the Qu...
How to add an import statementHI, I am using jassist to instrument the byte code. I want to add following statement to all methods: method.insertBefore("{ Profiler.start(); }"); In addition to this i should add the import statement for Profiler cl...
Javassist Enhancement failed: Duplicate Method errorHi there, I have a problem with some entities that I'm deploying in JBoss...I've added a post to the relevant forum for JBoss but since the problem seems to be a Javassist one I thought someone here might be able to ...
Thread Pop from empty stack after MethodCall.replace
Pop from empty stack after MethodCall.replaceHi, I need to replace the following call in legacy bytecode: dataInputStream.read(buf, 0, len); by dataInputStream.readFully(buf, 0, len); The original read() has the obvious flaw that it does not check for the r...
Thread FieldAccess not used for field length on arrays
FieldAccess not used for field length on arraysHi, is there any way to instrument accesses to field 'length' on arrays? It seems that ExprEditor.edit(FieldAccess f) is not called for such accesses (arraylength instruction). Regards, Martin
repository.jboss.org versions available?Version 3.7.1.GA is the last one deployed on http://repository.jboss.org/maven2/org/jboss/javassist/ I'm interested in 3.10.0.GA, but all of them should be made available. Does anyone know who I need to contact to m...
debugging javaasist code in runtime?hi.. i have this problem in cglib and hibernate's javaasist , more eclipse debugger stubmles on code that it cannot read, so i get the "attached source code" screen, is there a way i can step through this code in run...
Problem with branches and ldc/ldc_wHello, i'm working with javassist for quite some time now and I must say it is really impressive what this thing can do, and with what ease! Anyways, I'm confronted with one problem: My tool inserts an arbitrary ser...
Adding annotations to methodsI want to put my own annotation on a CtMethod. I can only see a getAnnotations method, and equally I can't find a setMethodInfo (which I think could potentially work with AnnotationsWriter). How do you add an annotat...
Thread Method body: introducing anonymous inner class
Method body: introducing anonymous inner classHi Is it possible to define anonymous inner class and pass parsing? Javassist is supposed to instrument method which in some cases must embed call into implementation of certain interface. generated method body is 100...
Using Javassist inside MojoHi all, I´m trying to use Javassist inside a Mojo. The code is very simple, but the program fails with a java.lang.ClassNotFoundException. First I collect all dependencies of Maven project: ...
Change CodeI wanted to override a method, and this method is inherited from another class and when the edit method with javassist he just putting code "method father", how can I get this code method father? How can I overwrite a...
How change final class to abastract class?How change final class to abastract class? Example: FinalClass.class public final class FinalClass {} to AbstractClass public abstract class AbstractClass{}
Java 1.5 GenericsHello, I am currently using Javassist and so far it has been great, thanks for the amazing job. My problem is that I have been trying to get the generic type of a class, I only need to be able to know which generic ...
Generating source code with JavassistHi there! Just wanted to let you know we created a little wrapper around Javassist to enable source code generation: http://www.fuin.org/srcgen4javassist/index.html Regards, Michael
Thread Generating source code in adition to class files
Generating source code in adition to class filesHi, Have you ever thought of adding the ability for Javassist to spit out source as well as class files? In particular to have in CtClass methods in addition to toClass and writeFile that output source. EG toSource a...
Source CodeHello what is the problem of generating source code ? It should be very easy to do it, why isnt it done ? Most people who use that framework would like to generate code in place of class files... Thanks
Javassist, j2ee 1.3, eclipseHi, I am developing a EJB project for weblogic 8.1 server, in eclipse, using hibernate for persistence. My project has a j2ee 1.3 facet, since this is the version weblogic 8.1 requires. Hibernate requires to put the ...