public class CodeSnipitLocation extends Object implements Comparable<CodeSnipitLocation>
| Constructor and Description |
|---|
CodeSnipitLocation(int start,
int end) |
| Modifier and Type | Method and Description |
|---|---|
static CodeSnipitLocation |
after(com.github.javaparser.ast.Node node)
|
static CodeSnipitLocation |
before(com.github.javaparser.ast.Node node)
|
int |
compareTo(CodeSnipitLocation that) |
boolean |
containsLines() |
boolean |
equals(Object obj) |
int |
getEnd() |
int |
getFirstIndex() |
int |
getLastIndex() |
int |
getStart() |
int |
hashCode() |
static CodeSnipitLocation |
of(int startEnd)
Creates a new
CodeSnipitLocation of a single line. |
static CodeSnipitLocation |
of(int start,
int end)
Creates a new
CodeSnipitLocation. |
static CodeSnipitLocation |
of(com.github.javaparser.ast.Node node)
Creates a new
CodeSnipitLocation for the given Node. |
int |
size() |
String |
toString() |
public int getStart()
startpublic int getEnd()
endpublic int getFirstIndex()
public int getLastIndex()
public boolean containsLines()
true if the end line is higher than the start line, false otherwise.public int size()
CodeSnipitLocation.public static CodeSnipitLocation of(int start, int end)
CodeSnipitLocation.start - The startend - The endCodeSnipitLocationpublic static CodeSnipitLocation of(int startEnd)
CodeSnipitLocation of a single line.startEnd - The start and endCodeSnipitLocationpublic static CodeSnipitLocation of(com.github.javaparser.ast.Node node)
CodeSnipitLocation for the given Node.node - The JavaParser Node used to determine the beginning and end of the node. Javadoc is not taken into account.CodeSnipitLocation.public static CodeSnipitLocation before(com.github.javaparser.ast.Node node)
node - the JavaParser Node.CodeSnipitLocation.public static CodeSnipitLocation after(com.github.javaparser.ast.Node node)
node - the JavaParser Node.CodeSnipitLocation.public int compareTo(CodeSnipitLocation that)
compareTo in interface Comparable<CodeSnipitLocation>Copyright © 2019. All rights reserved.