Package dev.cel.runtime
Class DefaultMetadata
- java.lang.Object
-
- dev.cel.runtime.DefaultMetadata
-
-
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.StringgetLocation()Returns the location (like a filename) of the interpreted expression.intgetPosition(long exprId)Returns the character position of the node in the source.booleanhasPosition(long exprId)Checks if a source position recorded for the provided expression id.
-
-
-
Method Detail
-
getLocation
public java.lang.String getLocation()
Description copied from interface:MetadataReturns the location (like a filename) of the interpreted expression.- Specified by:
getLocationin interfaceMetadata
-
getPosition
public int getPosition(long exprId)
Description copied from interface:MetadataReturns the character position of the node in the source. This is a 0-based character offset.- Specified by:
getPositionin interfaceMetadata
-
hasPosition
public boolean hasPosition(long exprId)
Description copied from interface:MetadataChecks if a source position recorded for the provided expression id.- Specified by:
hasPositionin interfaceMetadata
-
-