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 Summary

      Constructors 
      Constructor Description
      CelValidationResult​(CelAbstractSyntaxTree ast, com.google.common.collect.ImmutableList<CelIssue> issues)
      Internal: Consumers should not be creating an instance of this class on their own
      CelValidationResult​(CelSource source, com.google.common.collect.ImmutableList<CelIssue> issues)
      Internal: Consumers should not be creating an instance of this class directly.
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.common.collect.ImmutableList<CelIssue> getAllIssues()
      Return all CelIssues encountered durint validation.
      CelAbstractSyntaxTree getAst()
      Returns the validated CelAbstractSyntaxTree if one exists.
      java.lang.String getDebugString()
      Convert the CelIssue set to a debug string.
      com.google.common.collect.ImmutableList<CelIssue> getErrors()
      Return the set of CelIssues with an ERROR severity.
      java.lang.String getErrorString()
      Convert the CelIssues with ERROR severity to an error string.
      CelSource getSource()
      Return the CelSource associated with the result.
      boolean hasError()
      Whether a CelIssue with an CelIssue.Severity.ERROR severity was encountered during validation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
      • getDebugString

        public java.lang.String getDebugString()
        Convert the CelIssue set to a debug string.
      • getErrorString

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