Package co.permify.sdk.model
Class SourceInfo
java.lang.Object
co.permify.sdk.model.SourceInfo
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class SourceInfo
extends Object
Source information collected at parse time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExtensionsItem(Extension extensionsItem) addLineOffsetsItem(Integer lineOffsetsItem) booleanReturn true if this SourceInfo object is equal to o.extensions(List<Extension> extensions) A list of tags for extensions that were used while parsing or type checking the source expression.Monotonically increasing list of code point offsets where newlines `\\n` appear.The location name.A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion.A map from the parse node id (e.g.The syntax version of the source, e.g.inthashCode()lineOffsets(List<Integer> lineOffsets) macroCalls(Map<String, Expr> macroCalls) putMacroCallsItem(String key, Expr macroCallsItem) putPositionsItem(String key, Integer positionsItem) voidsetExtensions(List<Extension> extensions) voidsetLineOffsets(List<Integer> lineOffsets) voidsetLocation(String location) voidsetMacroCalls(Map<String, Expr> macroCalls) voidsetPositions(Map<String, Integer> positions) voidsetSyntaxVersion(String syntaxVersion) syntaxVersion(String syntaxVersion) toString()Convert the instance into URL query string.toUrlQueryString(String prefix) Convert the instance into URL query string.
-
Field Details
-
JSON_PROPERTY_SYNTAX_VERSION
- See Also:
-
JSON_PROPERTY_LOCATION
- See Also:
-
JSON_PROPERTY_LINE_OFFSETS
- See Also:
-
JSON_PROPERTY_POSITIONS
- See Also:
-
JSON_PROPERTY_MACRO_CALLS
- See Also:
-
JSON_PROPERTY_EXTENSIONS
- See Also:
-
-
Constructor Details
-
SourceInfo
public SourceInfo()
-
-
Method Details
-
syntaxVersion
-
getSyntaxVersion
The syntax version of the source, e.g. `cel1`.- Returns:
- syntaxVersion
-
setSyntaxVersion
-
location
-
getLocation
The location name. All position information attached to an expression is relative to this location. The location could be a file, UI element, or similar. For example, `acme/app/AnvilPolicy.cel`.- Returns:
- location
-
setLocation
-
lineOffsets
-
addLineOffsetsItem
-
getLineOffsets
Monotonically increasing list of code point offsets where newlines `\\n` appear. The line number of a given position is the index `i` where for a given `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The column may be derivd from `id_positions[id] - line_offsets[i]`.- Returns:
- lineOffsets
-
setLineOffsets
-
positions
-
putPositionsItem
-
getPositions
A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source.- Returns:
- positions
-
setPositions
-
macroCalls
-
putMacroCallsItem
-
getMacroCalls
A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion. For example, `has(value.field)` is a function call that is replaced by a `test_only` field selection in the AST. Likewise, the call `list.exists(e, e > 10)` translates to a comprehension expression. The key in the map corresponds to the expression id of the expanded macro, and the value is the call `Expr` that was replaced.- Returns:
- macroCalls
-
setMacroCalls
-
extensions
-
addExtensionsItem
-
getExtensions
A list of tags for extensions that were used while parsing or type checking the source expression. For example, optimizations that require special runtime support may be specified. These are used to check feature support between components in separate implementations. This can be used to either skip redundant work or report an error if the extension is unsupported.- Returns:
- extensions
-
setExtensions
-
equals
Return true if this SourceInfo object is equal to o. -
hashCode
public int hashCode() -
toString
-
toUrlQueryString
Convert the instance into URL query string.- Returns:
- URL query string
-
toUrlQueryString
Convert the instance into URL query string.- Parameters:
prefix- prefix of the query string- Returns:
- URL query string
-