Package dev.cel.checker
Interface TypeProvider
-
- All Known Implementing Classes:
DescriptorTypeProvider,TypeProvider.CombinedTypeProvider
@Deprecated public interface TypeProviderDeprecated.UseCelTypeProviderinstead.TheTypeProviderdefines methods to lookup types and enums, and resolve field types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTypeProvider.CombinedTypeProviderDeprecated.TheCombinedTypeProvidertakes one or moreTypeProviderinstances and attempts to look up aTypeinstance for a giventypeNameby calling eachTypeProviderin the order that they are provided to the constructor.static classTypeProvider.ExtensionFieldTypeDeprecated.Result of alookupExtensionType(java.lang.String)call.static classTypeProvider.FieldTypeDeprecated.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 aCelTypegiven a qualifiedtypeName.@Nullable java.lang.IntegerlookupEnumValue(java.lang.String enumName)Deprecated.Lookup theIntegerenum value given anenumName.default @Nullable TypeProvider.ExtensionFieldTypelookupExtensionType(java.lang.String extensionName)Deprecated.Lookup theFieldTypeof 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.FieldTypelookupFieldType(CelType type, java.lang.String fieldName)Deprecated.Lookup theFieldTypefor afieldNamewithin atype.@Nullable TypeProvider.FieldTypelookupFieldType(Type type, java.lang.String fieldName)Deprecated.Lookup theFieldTypefor afieldNamewithin atype.@Nullable TypelookupType(java.lang.String typeName)Deprecated.Lookup the aTypegiven a qualifiedtypeName.
-
-
-
Method Detail
-
lookupType
@Nullable Type lookupType(java.lang.String typeName)
Deprecated.Lookup the aTypegiven a qualifiedtypeName. Returns null if not found.
-
lookupCelType
default java.util.Optional<CelType> lookupCelType(java.lang.String typeName)
Deprecated.Lookup the aCelTypegiven a qualifiedtypeName. Returns null if not found.
-
lookupEnumValue
@Nullable java.lang.Integer lookupEnumValue(java.lang.String enumName)
Deprecated.Lookup theIntegerenum value given anenumName. Returns null if not found.
-
lookupFieldType
@Nullable TypeProvider.FieldType lookupFieldType(Type type, java.lang.String fieldName)
Deprecated.Lookup theFieldTypefor afieldNamewithin atype. Returns null if not found.The
FieldTypereturn 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 theFieldTypefor afieldNamewithin atype. Returns null if not found.The
FieldTypereturn 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 theFieldTypeof the named extension (specified using its full path). Returns null if not found.
-
-