0 Replies Latest reply on Apr 3, 2006 5:40 PM by Naaliel

    Is trapConstructor possible in Javassist?

    Naaliel Newbie


      I have a fault injection tool that use Javassist. To inject a failure at a Java Class, I select fields or methods of this class via graphic interface and the injection tool modify the parameters values. For this, the fault injection tool have implemented the trapFieldWrite and trapMethodcall Javassist methods.

      At this moment, would be very very interesting to inject failures at the constructor of any class that have fields as follow.

      public class MyClass {
      public MyClass(int A, int B) {

      I know that at the target system, the "MyClass" Constructor always receive a fix value for the fields "A" and "B". I could use another Javassist method for to change this fields. But, I didn't find yet a Javassist method like "trapConstructorcall". Otherwise, if anyone know how to do this by other way tell me please.

      If this kind of thing is still not possible, see it as a suggestion.

      Best Regards,

      Coimbra, Portugal