Enum Type

    • Enum Constant Detail

      • 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 Detail

      • values

        public static Type[] 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 (Type c : Type.values())
            System.out.println(c);
        
        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 WireType getWireType()
      • isUnsigned

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