public class MethodDeclarationParser extends Object
public static int myMethod(java.lang.String, int value,
java.lang.String... extra)
.
The parser is fairly lenient. It doesn't care if the set of modifiers is illegal, and it doesn't require that arguments have variable names assigned. A semi-colon may appear at the end of the signature.
At most one variable argument is supported (at the end), and all class names must be fully qualified.
Constructor and Description |
---|
MethodDeclarationParser(String declaration)
Parse the given method declaration, throwing a exception if the syntax
is wrong.
|
Modifier and Type | Method and Description |
---|---|
String |
getMethodName() |
Modifiers |
getModifiers() |
TypeDesc[] |
getParameters() |
TypeDesc |
getReturnType() |
public MethodDeclarationParser(String declaration) throws IllegalArgumentException
declaration
- declaration to parse, which matches Java syntaxIllegalArgumentException
- if declaration syntax is wrongCopyright © 2004-2015 Cojen. All Rights Reserved.