Enum Class Field.FieldType

java.lang.Object
java.lang.Enum<Field.FieldType>
com.hedera.pbj.compiler.impl.Field.FieldType
All Implemented Interfaces:
Serializable, Comparable<Field.FieldType>, Constable
Enclosing interface:
Field

public static enum Field.FieldType extends Enum<Field.FieldType>
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 Constants
    Enum Constant
    Description
    Protobuf bool(boolean) field type
    Protobuf bytes field type
    Protobuf double field type
    Protobuf enum(unsigned varint encoded int of ordinal) field type
    Protobuf fixed int32(fixed encoding int) field type
    Protobuf sfixed64(fixed encoding long) field type
    Protobuf float field type
    Protobuf int32(signed varint encoded int) field type
    Protobuf int64(signed varint encoded long) field type
     
    Protobuf message field type
    Protobuf oneof field type, this is not a true field type in protobuf.
    Protobuf sfixed int32(signed fixed encoding int) field type
    Protobuf sfixed64(signed fixed encoding long) field type
    Protobuf sint32(signed zigzag varint encoded int) field type
    Protobuf sint64(signed zigzag varint encoded long) field type
    Protobuf string field type
    Protobuf uint32(unsigned varint encoded int) field type
    Protobuf uint64(unsigned varint encoded long) field type
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    The type of boxed field type in Java code
    final String
    The field type default value in Java code
    final String
    The type of field type in Java code
    final int
    The protobuf wire type for field type
  • Method Summary

    Modifier and Type
    Method
    Description
    javaType(boolean repeated)
    Get the type of field type in Java code
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.
    int
    Get the protobuf wire type for field type

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • MESSAGE

      public static final Field.FieldType MESSAGE
      Protobuf message field type
    • ENUM

      public static final Field.FieldType ENUM
      Protobuf enum(unsigned varint encoded int of ordinal) field type
    • INT32

      public static final Field.FieldType INT32
      Protobuf int32(signed varint encoded int) field type
    • UINT32

      public static final Field.FieldType UINT32
      Protobuf uint32(unsigned varint encoded int) field type
    • SINT32

      public static final Field.FieldType SINT32
      Protobuf sint32(signed zigzag varint encoded int) field type
    • INT64

      public static final Field.FieldType INT64
      Protobuf int64(signed varint encoded long) field type
    • UINT64

      public static final Field.FieldType UINT64
      Protobuf uint64(unsigned varint encoded long) field type
    • SINT64

      public static final Field.FieldType SINT64
      Protobuf sint64(signed zigzag varint encoded long) field type
    • FLOAT

      public static final Field.FieldType FLOAT
      Protobuf float field type
    • FIXED32

      public static final Field.FieldType FIXED32
      Protobuf fixed int32(fixed encoding int) field type
    • SFIXED32

      public static final Field.FieldType SFIXED32
      Protobuf sfixed int32(signed fixed encoding int) field type
    • DOUBLE

      public static final Field.FieldType DOUBLE
      Protobuf double field type
    • FIXED64

      public static final Field.FieldType FIXED64
      Protobuf sfixed64(fixed encoding long) field type
    • SFIXED64

      public static final Field.FieldType SFIXED64
      Protobuf sfixed64(signed fixed encoding long) field type
    • STRING

      public static final Field.FieldType STRING
      Protobuf string field type
    • BOOL

      public static final Field.FieldType BOOL
      Protobuf bool(boolean) field type
    • BYTES

      public static final Field.FieldType BYTES
      Protobuf bytes field type
    • ONE_OF

      public static final Field.FieldType ONE_OF
      Protobuf oneof field type, this is not a true field type in protobuf. Needed here for a few edge cases
    • MAP

      public static final Field.FieldType MAP
  • Field Details

    • javaType

      public final String javaType
      The type of field type in Java code
    • boxedType

      public final String boxedType
      The type of boxed field type in Java code
    • javaDefault

      public final String javaDefault
      The field type default value in Java code
    • wireType

      public final int wireType
      The protobuf wire type for field type
  • Method Details

    • values

      public static Field.FieldType[] 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

      public static Field.FieldType valueOf(String name)
      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 name
      NullPointerException - 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

      public String javaType(boolean repeated)
      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