public final class ProblemLocation
extends java.lang.Object
Inspired by https://docs.gradle.org/8.14/javadoc/org/gradle/api/problems/ProblemLocation.html
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.Integer |
column() |
boolean |
equals(java.lang.Object obj) |
java.nio.file.Path |
file() |
int |
hashCode() |
@Nullable java.lang.Integer |
length()
|
@Nullable java.lang.Integer |
line() |
static ProblemLocation |
ofFile(java.nio.file.Path file) |
@Nullable java.lang.Integer |
offset()
0-based byte-offset in
file(). |
static ProblemLocation |
ofLocationInFile(java.nio.file.Path file,
int line) |
static ProblemLocation |
ofLocationInFile(java.nio.file.Path file,
int line,
int column) |
static ProblemLocation |
ofLocationInFile(java.nio.file.Path file,
int line,
int column,
int length) |
static ProblemLocation |
ofOffsetInFile(java.nio.file.Path file,
int offset,
int length) |
java.lang.String |
toString() |
ProblemLocation |
withFile(java.nio.file.Path file)
Copies this location and replaces the file path found in the copy.
|
public static ProblemLocation ofFile(java.nio.file.Path file)
public static ProblemLocation ofLocationInFile(java.nio.file.Path file, int line)
line - 1-based line number.public static ProblemLocation ofLocationInFile(java.nio.file.Path file, int line, int column)
line - 1-based line number.column - 1-based column number.public static ProblemLocation ofLocationInFile(java.nio.file.Path file, int line, int column, int length)
line - 1-based line number.column - 1-based column number.public static ProblemLocation ofOffsetInFile(java.nio.file.Path file, int offset, int length)
offset - 0-based byte offset into the file.length - Number of bytes starting at offset that are relevant to the problem. May be 0.public ProblemLocation withFile(java.nio.file.Path file)
public java.nio.file.Path file()
@Nullable public @Nullable java.lang.Integer line()
@Nullable public @Nullable java.lang.Integer column()
line().@Nullable public @Nullable java.lang.Integer offset()
@Nullable public @Nullable java.lang.Integer length()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object