Class NullableType


  • @CheckReturnValue
    @Immutable
    public abstract class NullableType
    extends CelType
    Nullable types are a union type which indicate that the value is either the targetType or SimpleType.NULL_TYPE
    • Constructor Detail

      • NullableType

        public NullableType()
    • 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
      • targetType

        public abstract CelType targetType()
      • 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
      • withFreshTypeParamVariables

        public CelType withFreshTypeParamVariables​(java.util.function.Function<java.lang.String,​java.lang.String> varNameGenerator)
        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:
        withFreshTypeParamVariables in class CelType