0 Replies Latest reply: Oct 28, 2011 7:39 AM by 896705 RSS

    Retriving method signature

      I'm writing an annotationprocessor to generate remoteinterface for EJB.

      In the processor i have the following codesnippet:

      for (Element e : roundEnv.getElementsAnnotatedWith(TRM_Facade.class)) {
      processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "A method :", e);

      the output is : public String oneFacadeMethod (String pPenr, int pNummer) throws IOException

      which is close to what I want to write in the generated interface file. ( Have to remove public)

      But I can't find any way to extract that string from the Element e.
      I can get the different parts of the signature if I CAST e to an ExecutableElement, ExecutableElement ex = (ExecutableElement) e;

      Is there a way to get the methodsignature as is instead of having to build it with ie. StringBuffer ?