Package dev.cel.checker
Interface TypeProvider
-
- All Known Implementing Classes:
DescriptorTypeProvider
,TypeProvider.CombinedTypeProvider
@Deprecated public interface TypeProvider
Deprecated.UseCelTypeProvider
instead.TheTypeProvider
defines methods to lookup types and enums, and resolve field types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TypeProvider.CombinedTypeProvider
Deprecated.TheCombinedTypeProvider
takes one or moreTypeProvider
instances and attempts to look up aType
instance for a giventypeName
by calling eachTypeProvider
in the order that they are provided to the constructor.static class
TypeProvider.ExtensionFieldType
Deprecated.Result of alookupExtensionType(java.lang.String)
call.static class
TypeProvider.FieldType
Deprecated.Result of alookupFieldType(dev.cel.expr.Type, java.lang.String)
call.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default java.util.Optional<CelType>
lookupCelType(java.lang.String typeName)
Deprecated.Lookup the aCelType
given a qualifiedtypeName
.@Nullable java.lang.Integer
lookupEnumValue(java.lang.String enumName)
Deprecated.Lookup theInteger
enum value given anenumName
.default @Nullable TypeProvider.ExtensionFieldType
lookupExtensionType(java.lang.String extensionName)
Deprecated.Lookup theFieldType
of the named extension (specified using its full path).default @Nullable com.google.common.collect.ImmutableSet<java.lang.String>
lookupFieldNames(Type type)
Deprecated.Returns the field names associated with the givenType
.default @Nullable TypeProvider.FieldType
lookupFieldType(CelType type, java.lang.String fieldName)
Deprecated.Lookup theFieldType
for afieldName
within atype
.@Nullable TypeProvider.FieldType
lookupFieldType(Type type, java.lang.String fieldName)
Deprecated.Lookup theFieldType
for afieldName
within atype
.@Nullable Type
lookupType(java.lang.String typeName)
Deprecated.Lookup the aType
given a qualifiedtypeName
.
-
-
-
Method Detail
-
lookupType
@Nullable Type lookupType(java.lang.String typeName)
Deprecated.Lookup the aType
given a qualifiedtypeName
. Returns null if not found.
-
lookupCelType
default java.util.Optional<CelType> lookupCelType(java.lang.String typeName)
Deprecated.Lookup the aCelType
given a qualifiedtypeName
. Returns null if not found.
-
lookupEnumValue
@Nullable java.lang.Integer lookupEnumValue(java.lang.String enumName)
Deprecated.Lookup theInteger
enum value given anenumName
. Returns null if not found.
-
lookupFieldType
@Nullable TypeProvider.FieldType lookupFieldType(Type type, java.lang.String fieldName)
Deprecated.Lookup theFieldType
for afieldName
within atype
. Returns null if not found.The
FieldType
return value will indicate the type of the field and whether presence check is supported via the ('has') macro.
-
lookupFieldType
default @Nullable TypeProvider.FieldType lookupFieldType(CelType type, java.lang.String fieldName)
Deprecated.Lookup theFieldType
for afieldName
within atype
. Returns null if not found.The
FieldType
return value will indicate the type of the field and whether presence check is supported via the ('has') macro.
-
lookupFieldNames
default @Nullable com.google.common.collect.ImmutableSet<java.lang.String> lookupFieldNames(Type type)
Deprecated.Returns the field names associated with the givenType
.If the type is not a message type, or the type is not found, the result is
null
.
-
lookupExtensionType
default @Nullable TypeProvider.ExtensionFieldType lookupExtensionType(java.lang.String extensionName)
Deprecated.Lookup theFieldType
of the named extension (specified using its full path). Returns null if not found.
-
-