Package dev.cel.common
Class CelIssue
- java.lang.Object
-
- dev.cel.common.CelIssue
-
@Immutable public abstract class CelIssue extends java.lang.Object
Encapulates aCelSourceLocation
and message representing an error within an expression.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CelIssue.Builder
Builder for configuringCelIssue
.static class
CelIssue.Severity
Severity of a CelIssue.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CelIssue
formatError(int line, int column, java.lang.String message)
BuildCelIssue
from the given line, column, format string, and arguments.static CelIssue
formatError(CelSourceLocation sourceLocation, java.lang.String message)
BuildCelIssue
from the givenCelSourceLocation
, format string, and arguments.abstract java.lang.String
getMessage()
abstract CelIssue.Severity
getSeverity()
abstract CelSourceLocation
getSourceLocation()
static CelIssue.Builder
newBuilder()
java.lang.String
toDisplayString(CelSource source)
Returns a string representing this error that is suitable for displaying to humans.
-
-
-
Method Detail
-
getSeverity
public abstract CelIssue.Severity getSeverity()
-
getSourceLocation
public abstract CelSourceLocation getSourceLocation()
-
getMessage
public abstract java.lang.String getMessage()
-
newBuilder
public static CelIssue.Builder newBuilder()
-
formatError
public static CelIssue formatError(CelSourceLocation sourceLocation, java.lang.String message)
BuildCelIssue
from the givenCelSourceLocation
, format string, and arguments.
-
formatError
public static CelIssue formatError(int line, int column, java.lang.String message)
BuildCelIssue
from the given line, column, format string, and arguments.
-
toDisplayString
public java.lang.String toDisplayString(CelSource source)
Returns a string representing this error that is suitable for displaying to humans.
-
-