Class CelValidationResult


  • @Immutable
    public final class CelValidationResult
    extends java.lang.Object
    CelValidationResult encapsulates the CelAbstractSyntaxTree and CelIssue set which may be generated during the parse and check phases.
    • Constructor Detail

      • CelValidationResult

        @Internal
        public CelValidationResult​(CelSource source,
                                   com.google.common.collect.ImmutableList<CelIssue> issues)
        Internal: Consumers should not be creating an instance of this class directly.
      • CelValidationResult

        @Internal
        public CelValidationResult​(CelSource source,
                                   java.lang.Throwable failure,
                                   com.google.common.collect.ImmutableList<CelIssue> issues)
        Internal: Consumers should not be creating an instance of this class directly.
      • CelValidationResult

        @Internal
        public CelValidationResult​(CelAbstractSyntaxTree ast,
                                   com.google.common.collect.ImmutableList<CelIssue> issues)
        Internal: Consumers should not be creating an instance of this class on their own
    • Method Detail

      • getSource

        public CelSource getSource()
        Return the CelSource associated with the result.
      • hasError

        public boolean hasError()
        Whether a CelIssue with an CelIssue.Severity.ERROR severity was encountered during validation.
      • getErrors

        public com.google.common.collect.ImmutableList<CelIssue> getErrors()
        Return the set of CelIssues with an ERROR severity.
      • getAllIssues

        public com.google.common.collect.ImmutableList<CelIssue> getAllIssues()
        Return all CelIssues encountered durint validation.
      • getIssueString

        public java.lang.String getIssueString()
        Convert all issues to a human-readable string.
      • getDebugString

        @Deprecated
        @InlineMe(replacement="this.getIssueString()")
        public java.lang.String getDebugString()
        Deprecated.
        Use getIssueString() instead.
        Convert the CelIssue set to a debug string.
      • getErrorString

        public java.lang.String getErrorString()
        Convert the CelIssues with ERROR severity to an error string.