Package dev.cel.common.internal
Enum WellKnownProto
- java.lang.Object
-
- java.lang.Enum<WellKnownProto>
-
- dev.cel.common.internal.WellKnownProto
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<WellKnownProto>
@Internal public enum WellKnownProto extends java.lang.Enum<WellKnownProto>
WellKnownProto types used throughout CEL. These types are specially handled to ensure that bidirectional conversion between CEL native values and these well-known types is performed consistently across runtimes.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY_VALUEBOOL_VALUEBYTES_VALUEDOUBLE_VALUEDURATIONEMPTYFIELD_MASKFLOAT_VALUEINT32_VALUEINT64_VALUEJSON_LIST_VALUEJSON_STRUCT_VALUEJSON_VALUESTRING_VALUETIMESTAMPUINT32_VALUEUINT64_VALUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<WellKnownProto>getByClass(java.lang.Class<?> clazz)static com.google.common.collect.ImmutableCollection<WellKnownProto>getByPathName(java.lang.String typeName)Returns the well known proto given the full proto path (example: google/protobuf/timestamp.proto)static java.util.Optional<WellKnownProto>getByTypeName(java.lang.String typeName)booleanisWrapperType()static booleanisWrapperType(java.lang.String typeName)Returns true if the providedtypeNameis a well known type, and it's a wrapper.java.lang.Class<?>messageClass()Gets the underlying java class for this WellKnownProto.java.lang.StringpathName()Gets the full proto path name (ex: google/protobuf/any.proto)java.lang.StringtypeName()Gets the fully qualified prototype name (ex: google.protobuf.FloatValue)static WellKnownProtovalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static WellKnownProto[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANY_VALUE
public static final WellKnownProto ANY_VALUE
-
DURATION
public static final WellKnownProto DURATION
-
JSON_LIST_VALUE
public static final WellKnownProto JSON_LIST_VALUE
-
JSON_STRUCT_VALUE
public static final WellKnownProto JSON_STRUCT_VALUE
-
JSON_VALUE
public static final WellKnownProto JSON_VALUE
-
TIMESTAMP
public static final WellKnownProto TIMESTAMP
-
FLOAT_VALUE
public static final WellKnownProto FLOAT_VALUE
-
INT32_VALUE
public static final WellKnownProto INT32_VALUE
-
INT64_VALUE
public static final WellKnownProto INT64_VALUE
-
STRING_VALUE
public static final WellKnownProto STRING_VALUE
-
BOOL_VALUE
public static final WellKnownProto BOOL_VALUE
-
BYTES_VALUE
public static final WellKnownProto BYTES_VALUE
-
DOUBLE_VALUE
public static final WellKnownProto DOUBLE_VALUE
-
UINT32_VALUE
public static final WellKnownProto UINT32_VALUE
-
UINT64_VALUE
public static final WellKnownProto UINT64_VALUE
-
EMPTY
public static final WellKnownProto EMPTY
-
FIELD_MASK
public static final WellKnownProto FIELD_MASK
-
-
Method Detail
-
values
public static WellKnownProto[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WellKnownProto c : WellKnownProto.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WellKnownProto valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
pathName
public java.lang.String pathName()
Gets the full proto path name (ex: google/protobuf/any.proto)
-
typeName
public java.lang.String typeName()
Gets the fully qualified prototype name (ex: google.protobuf.FloatValue)
-
messageClass
public java.lang.Class<?> messageClass()
Gets the underlying java class for this WellKnownProto.
-
getByPathName
public static com.google.common.collect.ImmutableCollection<WellKnownProto> getByPathName(java.lang.String typeName)
Returns the well known proto given the full proto path (example: google/protobuf/timestamp.proto)
-
getByTypeName
public static java.util.Optional<WellKnownProto> getByTypeName(java.lang.String typeName)
-
getByClass
public static java.util.Optional<WellKnownProto> getByClass(java.lang.Class<?> clazz)
-
isWrapperType
public static boolean isWrapperType(java.lang.String typeName)
Returns true if the providedtypeNameis a well known type, and it's a wrapper. False otherwise.
-
isWrapperType
public boolean isWrapperType()
-
-