Class CelSourceHelper


  • @Internal
    public final class CelSourceHelper
    extends java.lang.Object
    Helper methods for common source handling in CEL.

    CEL Library Internals. Do Not Use.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<CelSourceLocation> getOffsetLocation​(CelCodePointArray content, int offset)
      Get the line and column in the source expression text for the given code point offset.
      static java.util.Optional<java.lang.String> getSnippet​(CelCodePointArray content, int line)
      Extract the snippet text that corresponds to line.
      • Methods inherited from class java.lang.Object

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

      • getSnippet

        public static java.util.Optional<java.lang.String> getSnippet​(CelCodePointArray content,
                                                                      int line)
        Extract the snippet text that corresponds to line.
      • getOffsetLocation

        public static java.util.Optional<CelSourceLocation> getOffsetLocation​(CelCodePointArray content,
                                                                              int offset)
        Get the line and column in the source expression text for the given code point offset.