Package net.sourceforge.pmd.cpd
Class SourceCode
- java.lang.Object
-
- net.sourceforge.pmd.cpd.SourceCode
-
public class SourceCode extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SourceCode.CodeLoader
static class
SourceCode.FileCodeLoader
static class
SourceCode.ReaderCodeLoader
static class
SourceCode.StringCodeLoader
-
Constructor Summary
Constructors Constructor Description SourceCode(SourceCode.CodeLoader cl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCode()
StringBuilder
getCodeBuffer()
Newlines are normalized to \n.String
getFileName()
String
getSlice(int startLine, int endLine)
Loads a range of lines.
-
-
-
Constructor Detail
-
SourceCode
public SourceCode(SourceCode.CodeLoader cl)
-
-
Method Detail
-
getCodeBuffer
public StringBuilder getCodeBuffer()
Newlines are normalized to \n.
-
getSlice
public String getSlice(int startLine, int endLine)
Loads a range of lines. Newlines are normalized to \n- Parameters:
startLine
- Start line (inclusive, 1-based)endLine
- End line (inclusive, 1-based)
-
getFileName
public String getFileName()
-
-