• Instrumenting SQL execution times (Statement and PreparedSta

    Hello, 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...
    Profile Photo
    last modified by joachimhb
  • How to add an import statement

    HI, 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...
    Profile Photo
    last modified by spatnaik77
  • Javassist Enhancement failed: Duplicate Method error

    Hi 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 ...
    Profile Photo
    last modified by marinovm
  • Pop from empty stack after MethodCall.replace

    Hi, 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...
    Profile Photo
    created by dschulten
  • FieldAccess not used for field length on arrays

    Hi, 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
    Profile Photo
    created by mburger
  • 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...
    Profile Photo
    last modified by baerrach
  • 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...
    Profile Photo
    created by elhanan
  • Problem with branches and ldc/ldc_w

    Hello, 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...
    Profile Photo
    created by tumbleweed
  • Adding annotations to methods

    I 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...
    Profile Photo
    last modified by paulkeeble
  • adding annotations

    Hi, can anybody point me to a simple example of how to add an annotation to a class thru javassist? Thanks, Luca
    Profile Photo
    last modified by cat4hire
  • CtMethod --> java.lang.reflect.Method

    Hi All, Is there a direct way to convert from CtMethod to java.lang.reflect.Method? Thanks in advance, Andre
    Profile Photo
    created by ad-rocha
  • Method body: introducing anonymous inner class

    Hi 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...
    Profile Photo
    last modified by baranowb
  • Using Javassist inside Mojo

    Hi 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: ...
    Profile Photo
    last modified by ad-rocha
  • Change Code

    I 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...
    Profile Photo
    created by diogo.capistrano
  • 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{}
    Profile Photo
    last modified by diogo.capistrano
  • Java 1.5 Generics

    Hello, 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 ...
    Profile Photo
    created by nunoramiro
  • Generating source code with Javassist

    Hi 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
    Profile Photo
    last modified by michael-schnell
  • Generating source code in adition to class files

    Hi, 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...
    Profile Photo
    last modified by hlovatt
  • Source Code

    Hello 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
    Profile Photo
    last modified by tomasso
  • Javassist, j2ee 1.3, eclipse

    Hi, 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 ...
    Profile Photo
    last modified by danydyn