1 Reply Latest reply on Oct 2, 2008 1:39 PM by pmuir

    Custom annotations

    pmander

      Hi,


      I was attempting to use my own custom annotation on a seam component to identify a specific type of method. I define my annotation and assign it to a method on my component. However, at runtime I cannot reflect to the annotated method. If I run this outside of the contain and inspect the class through a simple tester it works fine.


      The code for the tester is as follows.



      Object obj = new SelectAddressBean();
                for (Method method : obj.getClass().getMethods()) {
                     PreProcess pp = method.getAnnotation(PreProcess.class);
                     if (pp != null) {
                          System.out.println("found it: " + method.getName());
                          break;
                     }
                }



      Inside the container and with obj being an instance of a seam created component, this does not work. Debugging shows that obj in the container is a class that is suffixed with javassit$$ and so I suspect that this is causing some issues.


      Can anyone help?