Class CelIssue


  • @Immutable
    public abstract class CelIssue
    extends java.lang.Object
    Encapulates a CelSourceLocation and message representing an error within an expression.
    • 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)
      Build CelIssue from the given line, column, format string, and arguments.
      static CelIssue formatError​(long exprId, dev.cel.common.CelSourceLocation sourceLocation, java.lang.String message)
      Build CelIssue from the given expression id, CelSourceLocation, format string, and arguments.
      static CelIssue formatError​(dev.cel.common.CelSourceLocation sourceLocation, java.lang.String message)
      Build CelIssue from the given CelSourceLocation, format string, and arguments.
      abstract long getExprId()  
      abstract java.lang.String getMessage()  
      abstract CelIssue.Severity getSeverity()  
      abstract dev.cel.common.CelSourceLocation getSourceLocation()  
      static CelIssue.Builder newBuilder()  
      java.lang.String toDisplayString​(dev.cel.common.Source source)
      Returns a string representing this error that is suitable for displaying to humans.
      static java.lang.String toDisplayString​(java.util.Collection<CelIssue> issues, dev.cel.common.Source source)
      Returns a human-readable error with all issues joined in a single string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSourceLocation

        public abstract dev.cel.common.CelSourceLocation getSourceLocation()
      • getMessage

        public abstract java.lang.String getMessage()
      • getExprId

        public abstract long getExprId()
      • formatError

        public static CelIssue formatError​(long exprId,
                                           dev.cel.common.CelSourceLocation sourceLocation,
                                           java.lang.String message)
        Build CelIssue from the given expression id, CelSourceLocation, format string, and arguments.
      • formatError

        public static CelIssue formatError​(dev.cel.common.CelSourceLocation sourceLocation,
                                           java.lang.String message)
        Build CelIssue from the given CelSourceLocation, format string, and arguments.
      • formatError

        public static CelIssue formatError​(int line,
                                           int column,
                                           java.lang.String message)
        Build CelIssue from the given line, column, format string, and arguments.
      • toDisplayString

        public static java.lang.String toDisplayString​(java.util.Collection<CelIssue> issues,
                                                       dev.cel.common.Source source)
        Returns a human-readable error with all issues joined in a single string.
      • toDisplayString

        public java.lang.String toDisplayString​(dev.cel.common.Source source)
        Returns a string representing this error that is suitable for displaying to humans.