0 Replies Latest reply on Oct 28, 2011 12:39 PM by 896705

    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 ?