Package dev.cel.common.types
Class StructTypeReference
- java.lang.Object
-
- dev.cel.common.types.CelType
-
- dev.cel.common.types.StructTypeReference
-
@CheckReturnValue @Immutable public abstract class StructTypeReference extends CelType
A simple type reference to a struct.This can be used if you simply need to refer to a struct (including Proto Messages) in an expression without providing its full definition.
If you need the ability to enumerate its fields, use a full-fledged
StructTypeorProtoMessageTypeinstead. An example is to mask fields that should not be exposed by leveragingProtoTypeMaskTypeProvider
-
-
Constructor Summary
Constructors Constructor Description StructTypeReference()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static StructTypeReferencecreate(java.lang.String name)booleanisAssignableFrom(CelType other)Determine whetherthistype is assignable from theothertype value.abstract CelKindkind()Return the typeCelKind.abstract java.lang.Stringname()Return the type name.-
Methods inherited from class dev.cel.common.types.CelType
parameters, withFreshTypeParamVariables, withParameters
-
-
-
-
Method Detail
-
name
public abstract java.lang.String name()
Description copied from class:CelTypeReturn the type name.For struct types this should be the fully qualified name. Be wary of introducing unqualified type names as they may collide with future CEL type.
-
isAssignableFrom
public boolean isAssignableFrom(CelType other)
Description copied from class:CelTypeDetermine whetherthistype is assignable from theothertype value.Defaults to an equality test.
- Overrides:
isAssignableFromin classCelType
-
create
public static StructTypeReference create(java.lang.String name)
-
-