Class DefaultMetadata

  • All Implemented Interfaces:
    Metadata

    @Immutable
    @Internal
    public final class DefaultMetadata
    extends java.lang.Object
    implements Metadata
    Metadata implementation based on CelAbstractSyntaxTree.

    CEL Library Internals. Do Not Use.

    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultMetadata​(dev.cel.common.CelAbstractSyntaxTree ast)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLocation()
      Returns the location (like a filename) of the interpreted expression.
      int getPosition​(long exprId)
      Returns the character position of the node in the source.
      boolean hasPosition​(long exprId)
      Checks if a source position recorded for the provided expression id.
      • Methods inherited from class java.lang.Object

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

      • DefaultMetadata

        public DefaultMetadata​(dev.cel.common.CelAbstractSyntaxTree ast)
    • Method Detail

      • getLocation

        public java.lang.String getLocation()
        Description copied from interface: Metadata
        Returns the location (like a filename) of the interpreted expression.
        Specified by:
        getLocation in interface Metadata
      • getPosition

        public int getPosition​(long exprId)
        Description copied from interface: Metadata
        Returns the character position of the node in the source. This is a 0-based character offset.
        Specified by:
        getPosition in interface Metadata
      • hasPosition

        public boolean hasPosition​(long exprId)
        Description copied from interface: Metadata
        Checks if a source position recorded for the provided expression id.
        Specified by:
        hasPosition in interface Metadata