Class 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 StructType or ProtoMessageType instead. An example is to mask fields that should not be exposed by leveraging ProtoTypeMaskTypeProvider

    • Constructor Detail

      • StructTypeReference

        public StructTypeReference()
    • Method Detail

      • kind

        public abstract CelKind kind()
        Description copied from class: CelType
        Return the type CelKind.
        Specified by:
        kind in class CelType
      • name

        public abstract java.lang.String name()
        Description copied from class: CelType
        Return 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.

        Specified by:
        name in class CelType
      • isAssignableFrom

        public boolean isAssignableFrom​(CelType other)
        Description copied from class: CelType
        Determine whether this type is assignable from the other type value.

        Defaults to an equality test.

        Overrides:
        isAssignableFrom in class CelType