Enum Class BinType

java.lang.Object
java.lang.Enum<BinType>
com.igormaznitsa.jbbp.mapper.BinType
All Implemented Interfaces:
Serializable, Comparable<BinType>, Constable

public enum BinType extends Enum<BinType>
The Enum contains all supported bin types for mapper.
Since:
1.0
See Also:
  • 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
    A Mapping field will be mapped to a parsed bit field.
    A Mapping field will be mapped to a parsed bit array field.
    A Mapping field will be mapped to a parsed boolean field.
    A Mapping field will be mapped to a parsed boolean array field.
    A Mapping field will be mapped to a parsed byte field.
    A Mapping field will be mapped to a parsed byte array field.
    A Mapping field will be mapped to a parsed double field.
    A Mapping field will be mapped to a parsed double array field.
    A Mapping field will be mapped to a parsed float field.
    A Mapping field will be mapped to a parsed float array field.
    A Mapping field will be mapped to a parsed integer field.
    A Mapping field will be mapped to a parsed integer array field.
    A Mapping field will be mapped to a parsed long field.
    A Mapping field will be mapped to a parsed long array field.
    A Mapping field will be mapped to a parsed short field.
    A Mapping field will be mapped to a parsed short array field.
    A Mapping field will be mapped to a parsed String field.
    A Mapping field will be mapped to a parsed String array field.
    A Mapping field will be mapped to a parsed structure field.
    A Mapping field will be mapped to a parsed structure array field.
    A Mapping field will be mapped to a parsed unsigned byte field.
    A Mapping field will be mapped to a parsed unsigned byte array field.
    A Mapping field will be mapped to a parsed unsigned integer field.
    A Mapping field will be mapped to a parsed unsigned integer array field.
    Undefined type, the mapper will be looking for compatible parsed field with the mapping field.
    A Mapping field will be mapped to a parsed unsigned short field.
    A Mapping field will be mapped to a parsed unsigned short array field.
  • Method Summary

    Modifier and Type
    Method
    Description
    static BinType
    findCompatible(Class<?> fieldClazz)
    Find compatible type for a class.
    Get The Field class.
    boolean
    Check that the type describes an array
    static BinType
    Returns the enum constant of this class with the specified name.
    static BinType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

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

    • UNDEFINED

      public static final BinType UNDEFINED
      Undefined type, the mapper will be looking for compatible parsed field with the mapping field.
    • BIT

      public static final BinType BIT
      A Mapping field will be mapped to a parsed bit field.
    • BOOL

      public static final BinType BOOL
      A Mapping field will be mapped to a parsed boolean field.
    • BYTE

      public static final BinType BYTE
      A Mapping field will be mapped to a parsed byte field.
    • UBYTE

      public static final BinType UBYTE
      A Mapping field will be mapped to a parsed unsigned byte field.
    • SHORT

      public static final BinType SHORT
      A Mapping field will be mapped to a parsed short field.
    • USHORT

      public static final BinType USHORT
      A Mapping field will be mapped to a parsed unsigned short field.
    • INT

      public static final BinType INT
      A Mapping field will be mapped to a parsed integer field.
    • UINT

      public static final BinType UINT
      A Mapping field will be mapped to a parsed unsigned integer field.
      Since:
      2.0.4
    • DOUBLE

      public static final BinType DOUBLE
      A Mapping field will be mapped to a parsed double field.
      Since:
      1.4.0
    • FLOAT

      public static final BinType FLOAT
      A Mapping field will be mapped to a parsed float field.
      Since:
      1.4.0
    • STRING

      public static final BinType STRING
      A Mapping field will be mapped to a parsed String field.
      Since:
      1.4.0
    • LONG

      public static final BinType LONG
      A Mapping field will be mapped to a parsed long field.
    • BIT_ARRAY

      public static final BinType BIT_ARRAY
      A Mapping field will be mapped to a parsed bit array field.
    • BOOL_ARRAY

      public static final BinType BOOL_ARRAY
      A Mapping field will be mapped to a parsed boolean array field.
    • BYTE_ARRAY

      public static final BinType BYTE_ARRAY
      A Mapping field will be mapped to a parsed byte array field.
    • UBYTE_ARRAY

      public static final BinType UBYTE_ARRAY
      A Mapping field will be mapped to a parsed unsigned byte array field.
    • SHORT_ARRAY

      public static final BinType SHORT_ARRAY
      A Mapping field will be mapped to a parsed short array field.
    • USHORT_ARRAY

      public static final BinType USHORT_ARRAY
      A Mapping field will be mapped to a parsed unsigned short array field.
    • INT_ARRAY

      public static final BinType INT_ARRAY
      A Mapping field will be mapped to a parsed integer array field.
    • UINT_ARRAY

      public static final BinType UINT_ARRAY
      A Mapping field will be mapped to a parsed unsigned integer array field.
    • LONG_ARRAY

      public static final BinType LONG_ARRAY
      A Mapping field will be mapped to a parsed long array field.
    • FLOAT_ARRAY

      public static final BinType FLOAT_ARRAY
      A Mapping field will be mapped to a parsed float array field.
      Since:
      1.4.0
    • STRING_ARRAY

      public static final BinType STRING_ARRAY
      A Mapping field will be mapped to a parsed String array field.
      Since:
      1.4.0
    • DOUBLE_ARRAY

      public static final BinType DOUBLE_ARRAY
      A Mapping field will be mapped to a parsed double array field.
      Since:
      1.4.0
    • STRUCT

      public static final BinType STRUCT
      A Mapping field will be mapped to a parsed structure field.
    • STRUCT_ARRAY

      public static final BinType STRUCT_ARRAY
      A Mapping field will be mapped to a parsed structure array field.
  • Method Details

    • values

      public static BinType[] 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 BinType 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
    • findCompatible

      public static BinType findCompatible(Class<?> fieldClazz)
      Find compatible type for a class.
      Parameters:
      fieldClazz - the field class to find compatible type, must not be null
      Returns:
      found compatible field type or null if not found
    • isArray

      public boolean isArray()
      Check that the type describes an array
      Returns:
      true if the type is an array, false otherwise
    • getFieldClass

      public Class<? extends JBBPAbstractField> getFieldClass()
      Get The Field class.
      Returns:
      the field class for the value, it can be null