public interface SourceContextLoader
| Modifier and Type | Interface and Description |
|---|---|
static class |
SourceContextLoader.Line
A pair of line numbers to the contents of lines.
|
| Modifier and Type | Method and Description |
|---|---|
static SourceContextLoader |
createLineBasedLoader(int defaultCodeLines)
Load context and include
defaultCodeLines lines leading up to the target line. |
static SourceContextLoader |
createModelAwareLoader(Model model,
int defaultCodeLinesHint)
Load context and include the most relevant information possible based on the kind of
FromSourceLocation. |
java.util.Collection<SourceContextLoader.Line> |
loadContext(FromSourceLocation location)
Attempts to load a file and return contextual source lines for the given source location.
|
java.util.Collection<SourceContextLoader.Line> loadContext(FromSourceLocation location)
location - Source location to load.static SourceContextLoader createLineBasedLoader(int defaultCodeLines)
defaultCodeLines lines leading up to the target line.defaultCodeLines - Number of leading lines to include leading up to the target. Must be greater than 0.java.lang.IllegalArgumentException - if defaultCodeLines is less than 1.static SourceContextLoader createModelAwareLoader(Model model, int defaultCodeLinesHint)
FromSourceLocation.defaultCodeLinesHint - Limits the number of context lines in some cases. Must be greater than 0.java.lang.IllegalArgumentException - if defaultCodeLinesHint is less than 1.