Package dev.cel.common.ast
Class CelMutableExpr
- java.lang.Object
-
- dev.cel.common.ast.CelMutableExpr
-
- All Implemented Interfaces:
dev.cel.common.ast.Expression
public final class CelMutableExpr extends java.lang.Object implements dev.cel.common.ast.ExpressionAn abstract representation of a common expression that allows mutation in any of its properties. The expressions are semantically the same as that of the immutableCelExpr. Refer toExpressionfor details.This allows for an efficient optimization of an AST without having to traverse and rebuild the entire tree.
This class is not thread-safe by design.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCelMutableExpr.CelMutableCallA mutable call expression.static classCelMutableExpr.CelMutableComprehensionA mutable comprehension expression applied to a list or map.static classCelMutableExpr.CelMutableIdentA mutable identifier expression.static classCelMutableExpr.CelMutableListA mutable list creation expression.static classCelMutableExpr.CelMutableMapA mutable map creation expression.static classCelMutableExpr.CelMutableSelectA mutable field selection expression.static classCelMutableExpr.CelMutableStructA mutable list creation expression.-
Nested classes/interfaces inherited from interface dev.cel.common.ast.Expression
dev.cel.common.ast.Expression.Call<E extends dev.cel.common.ast.Expression>, dev.cel.common.ast.Expression.Comprehension<E extends dev.cel.common.ast.Expression>, dev.cel.common.ast.Expression.Ident, dev.cel.common.ast.Expression.List<E extends dev.cel.common.ast.Expression>, dev.cel.common.ast.Expression.Map<E extends dev.cel.common.ast.Expression.Map.Entry<?>>, dev.cel.common.ast.Expression.Select<E extends dev.cel.common.ast.Expression>, dev.cel.common.ast.Expression.Struct<E extends dev.cel.common.ast.Expression.Struct.Entry<?>>
-
-
Method Summary
-
-
-
Method Detail
-
id
public long id()
- Specified by:
idin interfacedev.cel.common.ast.Expression
-
setId
public void setId(long id)
-
getKind
public dev.cel.common.ast.CelExpr.ExprKind.Kind getKind()
- Specified by:
getKindin interfacedev.cel.common.ast.Expression
-
notSet
public dev.cel.common.ast.CelExpr.CelNotSet notSet()
-
constant
public dev.cel.common.ast.CelConstant constant()
- Specified by:
constantin interfacedev.cel.common.ast.Expression
-
ident
public CelMutableExpr.CelMutableIdent ident()
- Specified by:
identin interfacedev.cel.common.ast.Expression
-
select
public CelMutableExpr.CelMutableSelect select()
- Specified by:
selectin interfacedev.cel.common.ast.Expression
-
call
public CelMutableExpr.CelMutableCall call()
- Specified by:
callin interfacedev.cel.common.ast.Expression
-
list
public CelMutableExpr.CelMutableList list()
- Specified by:
listin interfacedev.cel.common.ast.Expression
-
struct
public CelMutableExpr.CelMutableStruct struct()
- Specified by:
structin interfacedev.cel.common.ast.Expression
-
map
public CelMutableExpr.CelMutableMap map()
- Specified by:
mapin interfacedev.cel.common.ast.Expression
-
comprehension
public CelMutableExpr.CelMutableComprehension comprehension()
- Specified by:
comprehensionin interfacedev.cel.common.ast.Expression
-
setConstant
public void setConstant(dev.cel.common.ast.CelConstant constant)
-
setIdent
public void setIdent(CelMutableExpr.CelMutableIdent ident)
-
setSelect
public void setSelect(CelMutableExpr.CelMutableSelect select)
-
setCall
public void setCall(CelMutableExpr.CelMutableCall call)
-
setList
public void setList(CelMutableExpr.CelMutableList list)
-
setStruct
public void setStruct(CelMutableExpr.CelMutableStruct struct)
-
setMap
public void setMap(CelMutableExpr.CelMutableMap map)
-
setComprehension
public void setComprehension(CelMutableExpr.CelMutableComprehension comprehension)
-
ofNotSet
public static CelMutableExpr ofNotSet()
-
ofNotSet
public static CelMutableExpr ofNotSet(long id)
-
ofConstant
public static CelMutableExpr ofConstant(dev.cel.common.ast.CelConstant constant)
-
ofConstant
public static CelMutableExpr ofConstant(long id, dev.cel.common.ast.CelConstant constant)
-
ofIdent
public static CelMutableExpr ofIdent(java.lang.String name)
-
ofIdent
public static CelMutableExpr ofIdent(long id, java.lang.String name)
-
ofSelect
public static CelMutableExpr ofSelect(CelMutableExpr.CelMutableSelect mutableSelect)
-
ofSelect
public static CelMutableExpr ofSelect(long id, CelMutableExpr.CelMutableSelect mutableSelect)
-
ofCall
public static CelMutableExpr ofCall(CelMutableExpr.CelMutableCall mutableCall)
-
ofCall
public static CelMutableExpr ofCall(long id, CelMutableExpr.CelMutableCall mutableCall)
-
ofList
public static CelMutableExpr ofList(CelMutableExpr.CelMutableList mutableList)
-
ofList
public static CelMutableExpr ofList(long id, CelMutableExpr.CelMutableList mutableList)
-
ofStruct
public static CelMutableExpr ofStruct(CelMutableExpr.CelMutableStruct mutableStruct)
-
ofStruct
public static CelMutableExpr ofStruct(long id, CelMutableExpr.CelMutableStruct mutableStruct)
-
ofMap
public static CelMutableExpr ofMap(CelMutableExpr.CelMutableMap mutableMap)
-
ofMap
public static CelMutableExpr ofMap(long id, CelMutableExpr.CelMutableMap mutableMap)
-
ofComprehension
public static CelMutableExpr ofComprehension(CelMutableExpr.CelMutableComprehension mutableComprehension)
-
ofComprehension
public static CelMutableExpr ofComprehension(long id, CelMutableExpr.CelMutableComprehension mutableComprehension)
-
newInstance
public static CelMutableExpr newInstance(CelMutableExpr other)
Constructs a deep copy of the mutable expression.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-