Example #1
0
 /**
  * Uses {@link JavaLexer} to extract a MethodBuffer definition.
  *
  * <p>This is slower than manually setting method metadata, but it does automatically import fully
  * qualified class names (if and only if there is not already an imported type matching imported
  * simple name).
  *
  * @param definition - Any valid java method definition. "public void doSomething()"
  * @return - A method buffer initialized to whatever the provided text lexes.
  *     <p>Report any parsing errors to github.com/WeTheInternet/com.google.gwt.thirdparty.xapi
  *     and/or [email protected]
  */
 public MethodBuffer setDefinition(final String definition) {
   // JavaMetadata will extract all modifiers for us
   JavaLexer.visitMethodSignature(this, context, definition, 0);
   return this;
 }