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 TypeMethodDescriptionaddLineOffsetsItem(Integer lineOffsetsItem) booleanReturn true if this SourceInfo object is equal to o.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) 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:
-
-
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
-
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
-
equals
-
hashCode
-
toString
-
toUrlQueryString
Convert the instance into URL query string.- Returns:
- URL query string
-
toUrlQueryString
-