java.lang.Object
java.lang.Enum<Type>
org.infinispan.protostream.descriptors.Type
All Implemented Interfaces:
Serializable, Comparable<Type>, java.lang.constant.Constable

public enum Type extends Enum<Type>
Type of a field in Protobuf, can be any value defined in https://developers.google.com/protocol-buffers/docs/proto3#scalar plus composite types group, message and enum.
Since:
2.0
Author:
gustavonalle
  • Enum Constant Details

    • DOUBLE

      public static final Type DOUBLE
    • FLOAT

      public static final Type FLOAT
    • INT64

      public static final Type INT64
    • UINT64

      public static final Type UINT64
    • INT32

      public static final Type INT32
    • FIXED64

      public static final Type FIXED64
    • FIXED32

      public static final Type FIXED32
    • BOOL

      public static final Type BOOL
    • STRING

      public static final Type STRING
    • BYTES

      public static final Type BYTES
    • UINT32

      public static final Type UINT32
    • SFIXED32

      public static final Type SFIXED32
    • SFIXED64

      public static final Type SFIXED64
    • SINT32

      public static final Type SINT32
    • SINT64

      public static final Type SINT64
    • GROUP

      public static final Type GROUP
    • MESSAGE

      public static final Type MESSAGE
    • ENUM

      public static final Type ENUM
  • Method Details

    • values

      public static Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Type valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • primitiveFromString

      public static Type primitiveFromString(String typeName)
      If the type name is a primitive, it returns the corresponding enum constant, otherwise it returns null.
    • getJavaType

      public JavaType getJavaType()
    • getWireType

      public int getWireType()
    • isUnsigned

      public boolean isUnsigned()
      Returns true only if the type is an unsigned numeric type, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Type>