Class ListType


  • @CheckReturnValue
    @Immutable
    public abstract class ListType
    extends CelType
    Lists are a parameterized type with the parameter indicating the elemType.
    • Constructor Detail

      • ListType

        public ListType()
    • 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
      • parameters

        public abstract com.google.common.collect.ImmutableList<CelType> parameters()
        Description copied from class: CelType
        Return the type parameters. e.g. a map's key and value CelType.
        Overrides:
        parameters in class CelType
      • withParameters

        public CelType withParameters​(com.google.common.collect.ImmutableList<CelType> parameters)
        Description copied from class: CelType
        Instantiate a new copy of this type with alternative parameters.

        If the CelType does not have any parameters, then the return value defaults to the original type instance.

        Overrides:
        withParameters in class CelType
      • hasElemType

        public boolean hasElemType()
      • elemType

        public CelType elemType()
      • create

        @Internal
        public static ListType create()
        Do not use. This exists for compatibility reason with ListType from checked.proto.

        Note that a parameterized collection, such as List<Int> or a Map<Int, Int>, is a type-checker construct. An unparameterized list here is what the runtime looks at after type-erasure, typically for handling dynamic dispatch.