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
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.
-
-
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.Integer
lookupEnumValue(java.lang.String enumName)
Lookup theInteger
enum value given anenumName
.@Nullable TypeProvider.ExtensionFieldType
lookupExtensionType(java.lang.String extensionName)
Lookup theFieldType
of 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.FieldType
lookupFieldType(Type type, java.lang.String fieldName)
Lookup theFieldType
for afieldName
within atype
.@Nullable Type
lookupType(java.lang.String typeName)
Lookup the aType
given 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:TypeProvider
Lookup the aType
given a qualifiedtypeName
. Returns null if not found.- Specified by:
lookupType
in interfaceTypeProvider
-
lookupEnumValue
public @Nullable java.lang.Integer lookupEnumValue(java.lang.String enumName)
Description copied from interface:TypeProvider
Lookup theInteger
enum value given anenumName
. Returns null if not found.- Specified by:
lookupEnumValue
in interfaceTypeProvider
-
lookupFieldType
public @Nullable TypeProvider.FieldType lookupFieldType(Type type, java.lang.String fieldName)
Description copied from interface:TypeProvider
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.- Specified by:
lookupFieldType
in interfaceTypeProvider
-
lookupFieldNames
public @Nullable com.google.common.collect.ImmutableSet<java.lang.String> lookupFieldNames(Type type)
Description copied from interface:TypeProvider
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
.- Specified by:
lookupFieldNames
in interfaceTypeProvider
-
lookupExtensionType
public @Nullable TypeProvider.ExtensionFieldType lookupExtensionType(java.lang.String extensionName)
Description copied from interface:TypeProvider
Lookup theFieldType
of the named extension (specified using its full path). Returns null if not found.- Specified by:
lookupExtensionType
in interfaceTypeProvider
-
-