Package com.hedera.pbj.compiler.impl
Enum Class Field.FieldType
- All Implemented Interfaces:
Serializable,Comparable<Field.FieldType>,Constable
- Enclosing interface:
Field
Field type enum for use in field classes
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionProtobuf bool(boolean) field typeProtobuf bytes field typeProtobuf double field typeProtobuf enum(unsigned varint encoded int of ordinal) field typeProtobuf fixed int32(fixed encoding int) field typeProtobuf sfixed64(fixed encoding long) field typeProtobuf float field typeProtobuf int32(signed varint encoded int) field typeProtobuf int64(signed varint encoded long) field typeProtobuf message field typeProtobuf oneof field type, this is not a true field type in protobuf.Protobuf sfixed int32(signed fixed encoding int) field typeProtobuf sfixed64(signed fixed encoding long) field typeProtobuf sint32(signed zigzag varint encoded int) field typeProtobuf sint64(signed zigzag varint encoded long) field typeProtobuf string field typeProtobuf uint32(unsigned varint encoded int) field typeProtobuf uint64(unsigned varint encoded long) field type -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionjavaType(boolean repeated) Get the type of field type in Java codestatic Field.FieldTypeReturns the enum constant of this class with the specified name.static Field.FieldType[]values()Returns an array containing the constants of this enum class, in the order they are declared.intwireType()Get the protobuf wire type for field type
-
Enum Constant Details
-
MESSAGE
Protobuf message field type -
ENUM
Protobuf enum(unsigned varint encoded int of ordinal) field type -
INT32
Protobuf int32(signed varint encoded int) field type -
UINT32
Protobuf uint32(unsigned varint encoded int) field type -
SINT32
Protobuf sint32(signed zigzag varint encoded int) field type -
INT64
Protobuf int64(signed varint encoded long) field type -
UINT64
Protobuf uint64(unsigned varint encoded long) field type -
SINT64
Protobuf sint64(signed zigzag varint encoded long) field type -
FLOAT
Protobuf float field type -
FIXED32
Protobuf fixed int32(fixed encoding int) field type -
SFIXED32
Protobuf sfixed int32(signed fixed encoding int) field type -
DOUBLE
Protobuf double field type -
FIXED64
Protobuf sfixed64(fixed encoding long) field type -
SFIXED64
Protobuf sfixed64(signed fixed encoding long) field type -
STRING
Protobuf string field type -
BOOL
Protobuf bool(boolean) field type -
BYTES
Protobuf bytes field type -
ONE_OF
Protobuf oneof field type, this is not a true field type in protobuf. Needed here for a few edge cases -
MAP
-
-
Field Details
-
javaType
The type of field type in Java code -
boxedType
The type of boxed field type in Java code -
javaDefault
The field type default value in Java code -
wireType
public final int wireTypeThe protobuf wire type for field type
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
wireType
public int wireType()Get the protobuf wire type for field type- Returns:
- protobuf wire type for field type
-
javaType
Get the type of field type in Java code- Parameters:
repeated- if the field is repeated or not, java types are different for repeated field- Returns:
- The type of field type in Java code
-