Package dev.cel.common
Class CelIssue
- java.lang.Object
-
- dev.cel.common.CelIssue
-
@Immutable public abstract class CelIssue extends java.lang.ObjectEncapulates aCelSourceLocationand message representing an error within an expression.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCelIssue.BuilderBuilder for configuringCelIssue.static classCelIssue.SeveritySeverity of a CelIssue.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CelIssueformatError(int line, int column, java.lang.String message)BuildCelIssuefrom the given line, column, format string, and arguments.static CelIssueformatError(CelSourceLocation sourceLocation, java.lang.String message)BuildCelIssuefrom the givenCelSourceLocation, format string, and arguments.abstract java.lang.StringgetMessage()abstract CelIssue.SeveritygetSeverity()abstract CelSourceLocationgetSourceLocation()static CelIssue.BuildernewBuilder()java.lang.StringtoDisplayString(Source source)Returns a string representing this error that is suitable for displaying to humans.static java.lang.StringtoDisplayString(java.util.Collection<CelIssue> issues, Source source)Returns a human-readable error with all issues joined in a single string.
-
-
-
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)
BuildCelIssuefrom the givenCelSourceLocation, format string, and arguments.
-
formatError
public static CelIssue formatError(int line, int column, java.lang.String message)
BuildCelIssuefrom the given line, column, format string, and arguments.
-
toDisplayString
public static java.lang.String toDisplayString(java.util.Collection<CelIssue> issues, Source source)
Returns a human-readable error with all issues joined in a single string.
-
toDisplayString
public java.lang.String toDisplayString(Source source)
Returns a string representing this error that is suitable for displaying to humans.
-
-