Package dev.cel.checker
Class TypeProvider.CombinedTypeProvider
- java.lang.Object
-
- dev.cel.checker.TypeProvider.CombinedTypeProvider
-
- All Implemented Interfaces:
TypeProvider
- Enclosing interface:
- TypeProvider
public static final class TypeProvider.CombinedTypeProvider extends java.lang.Object implements TypeProvider
TheCombinedTypeProvidertakes one or moreTypeProviderinstances and attempts to look up aTypeinstance for a giventypeNameby calling eachTypeProviderin the order that they are provided to the constructor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.cel.checker.TypeProvider
TypeProvider.CombinedTypeProvider, TypeProvider.ExtensionFieldType, TypeProvider.FieldType
-
-
Constructor Summary
Constructors Constructor Description CombinedTypeProvider(java.lang.Iterable<TypeProvider> typeProviders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.IntegerlookupEnumValue(java.lang.String enumName)Lookup theIntegerenum value given anenumName.@Nullable TypeProvider.ExtensionFieldTypelookupExtensionType(java.lang.String extensionName)Lookup theFieldTypeof the named extension (specified using its full path).@Nullable com.google.common.collect.ImmutableSet<java.lang.String>lookupFieldNames(Type type)Returns the field names associated with the givenType.@Nullable TypeProvider.FieldTypelookupFieldType(Type type, java.lang.String fieldName)Lookup theFieldTypefor afieldNamewithin atype.@Nullable TypelookupType(java.lang.String typeName)Lookup the aTypegiven a qualifiedtypeName.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.cel.checker.TypeProvider
lookupCelType, lookupFieldType
-
-
-
-
Constructor Detail
-
CombinedTypeProvider
public CombinedTypeProvider(java.lang.Iterable<TypeProvider> typeProviders)
-
-
Method Detail
-
lookupType
public @Nullable Type lookupType(java.lang.String typeName)
Description copied from interface:TypeProviderLookup the aTypegiven a qualifiedtypeName. Returns null if not found.- Specified by:
lookupTypein interfaceTypeProvider
-
lookupEnumValue
public @Nullable java.lang.Integer lookupEnumValue(java.lang.String enumName)
Description copied from interface:TypeProviderLookup theIntegerenum value given anenumName. Returns null if not found.- Specified by:
lookupEnumValuein interfaceTypeProvider
-
lookupFieldType
public @Nullable TypeProvider.FieldType lookupFieldType(Type type, java.lang.String fieldName)
Description copied from interface:TypeProviderLookup 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.- Specified by:
lookupFieldTypein interfaceTypeProvider
-
lookupFieldNames
public @Nullable com.google.common.collect.ImmutableSet<java.lang.String> lookupFieldNames(Type type)
Description copied from interface:TypeProviderReturns 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.- Specified by:
lookupFieldNamesin interfaceTypeProvider
-
lookupExtensionType
public @Nullable TypeProvider.ExtensionFieldType lookupExtensionType(java.lang.String extensionName)
Description copied from interface:TypeProviderLookup theFieldTypeof the named extension (specified using its full path). Returns null if not found.- Specified by:
lookupExtensionTypein interfaceTypeProvider
-
-