• Generating a method with Generics

    Hi, For the project I am workking on I need to generate a class like this. class Foo{      pubic void doSomething(List<String> l){      } }   But this falis whe...
    Profile Photo
    created by Prabhath Suminda
  • Matching and replacing a sequence of bytecodes/instructions

    Hi,   I have the following problem to solve:   I need to detect assignments to a specific field, where the right-hand side is also of a specific form, e.g. it is the same field (or the field of the same sp...
    Profile Photo
    last modified by susanin
  • Javassist, PowerMock and Java 7 ... bad combination

    Hello,   ( sorry for the "repost"; created an article before; hopefully that one was successfully deleted ... so here comes the "discussion" version )   we are using JUnit & powermock (and easymock) to...
    Profile Photo
    last modified by Edwin Guenthner
  • How to get inner class name with annotation by ClassFile ?

    Hi I have simple class with annotated inner classes:   public class Main {        @MyAnnotation      private static final class A{      ...
    Profile Photo
    created by Maciej Madajczyk
  • How can I instrument access only to a specific array

    Hi,   I have a class which has one field of an array type, e.g. class Pojo {      int[] ids = new int[100];      .... }   I'd like to replace only accesses to th...
    Profile Photo
    created by susanin
  • Javassist seems to be stripping off existing annotations - why?

    Hello.   I'm trying to use Javassist in a jUnit test.   My objective is to create a dynamic class based on an existing class, for the purposes of dynamically adding an annotation.   In my...
    Profile Photo
    created by Paul Cugini
  • How to manipulate aload instruction in Javassist?

    Hi,   Can I get the object reference of "aload" instruction in Javassist?  or How to manipulate aload instruction in Javassist?   Any suggestions?   Thank you in advance   Young
    Profile Photo
    last modified by Young Zoung
  • How to get method parameter names from a class generated by Javaassist

    Hi All,   I highly appreciate your time and help.   I cannot access the names of the method’s parameters from a class file generated with Javaassist.  To access the method names, the class needs...
    Profile Photo
    created by indika Kumara
  • how to change type of a local variable in javassist

    Hi, I am working on removing dependency in test suits where I need to change type of some local variables (to object). How can I do that? I did not find api method in javassist that allows manipulation of local varia...
    Profile Photo
    created by zaliashams
  • Problem with GluonJ and javassist.gluonj.util.Loader

    I have a problem with part of GluonJ library: javassist.gluonj.util.Loader I have this code:       Loader loader = new Loader(Class.class.getClassLoader(), new String[0]);     Cla...
    Profile Photo
    created by a b
  • What's the difference between the Maven and direct-download Javassist JARs?

    I've noticed that about 10% of the classes in javassist-3.14.0-GA.jar from Maven differ from those in javassist.jar from javassist-3.14.0-GA.zip. Specifically the classes below. Can anyone tell me what the differences...
    Profile Photo
    created by David Moles
  • Annotation checking in OSGi environment causes troubles

    Hi,   First I want to say that javassist is a really great bytemanipulation framework and it works really really good. I use javassist in an OSGi environment to do some class enhancements in runtime with weaving...
    Profile Photo
    created by Felix Mayerhuber
  • ClassCastException when modifiying JOptionPane behaviour

    I'm triying to modify the JOptionPane behaviour to log all the user responses. If do it when the class is loaded with HotsSapper is OK, but i can't do it whith the HotSwapper because the application it's launched by J...
  • Is is possible to instrument java core classes? Classes loaded by the bootstrap classloader

    Hello!   I want to add an "insertBefore" on a method of a core JDK 5 class. For some reason it´s not working. Here's the code:     ClassPool pool = ClassPool.getDefault(); CtClass ctClass = pool....
    Profile Photo
    created by Rodrigo Uchoa
  • Interception of return statement with Javassist

    Hello, Is there a way to intercept the return statement of a method body using the Javassist source-level API?   I'd like to know which object is returned by a method, and insert some code before the return sta...
    Profile Photo
    created by Enric Tejedor
  • PowerMockito jvisualvm profiler throws javassist.NotFoundException

    I have documented this issue here: http://code.google.com/p/powermock/issues/detail?id=370   I'm trying to use jvisualvm on a junit test that uses PowerMockito to mock out a new() for a class.  When I run ...
    Profile Photo
    created by wmcdonald
  • Operations over collections are not working properly when my bean implements Serializable interface

    HI, I am using JSF1.2 and RichFaces3.3. when I am trying to add a object to my collection,the object is override the previous values.when i remvoe the Serializable then it is working fine.any suggestions please........
  • Javassist-3.16.0-GA LocalVariableTable invalid length exception

    I'm using PowerMock's @PrepareForTest annotation, specifying my own class, DbUtil's QueryRunner.class, DbUtil's ResultSetHandler.class and DataSource.class.  Both my own class and QueryRunner.class cause javassis...
    Profile Photo
    created by rcoe67
  • Javassist 3.15.0-GA, StackOverflowError with $sig in call to static method, can anyone confirm?

    Cheers,   here's an Example of a possible bug I've found. Could anyone confirm this or prove me an idiot, so I can either file a bug report or go kill myself in shame?   Using $sig or $class as method par...
    Profile Photo
    last modified by Wanja Gayk
  • how to load external property file in JBOSS

    My application is using websales.property file ...where should i place the file so that this file can be loaded in my application
    Profile Photo
    last modified by Sandip Dhande