Add method declaration line as class file attribute
Status: Inactive
Brought to you by:
vocaro
A more elegant (and foolproof) way of implementing ReflectionUtilities.getSourceCodeLine() is to modify javac to write the line number of the method to a custom attribute. The getSourceCodeLine() method would then simply read the attribute.
This has the added benefit of eliminating the sourceCode parameter from getSourceCodeLine() and the eraseComments function from ReflectionUtilities.