public class LineRangeParser extends Object
We need this to demarcate raw source code for citation, where a method/nested class begins and where it ends. The challenge is matching the Javadoc metadata of a method to this parser's metadata of a method. Javadoc has knowledge of the type system (e.g. qualified vs. unqualified parameters of a method are detectable) while this parser only has the declared string as-is from the source file and there is no way we can qualify/unqualify a method parameter type. So calculating a method signature here might have a different result than calculating a method signature in the Javadoc reader.
In other words, don't be surprised when the source lines of a method can't be found if you use qualified type names on method parameters in your source.
TODO: Revisit this and see if it helps: http://code.google.com/p/javaparser/issues/detail?id=9| Modifier and Type | Field and Description |
|---|---|
protected Map<String,LineRange> |
methodsLineRange |
protected Map<String,LineRange> |
typesLineRange |
| Constructor and Description |
|---|
LineRangeParser(File file) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,LineRange> |
getMethodsLineRange() |
protected String |
getSignature(japa.parser.ast.body.MethodDeclaration methodDeclaration) |
Map<String,LineRange> |
getTypesLineRange() |
public LineRangeParser(File file) throws IOException, japa.parser.ParseException
IOExceptionjapa.parser.ParseExceptionCopyright © 2015 4th Line GmbH, Switzerland. All Rights Reserved.