def __init__(self, data):
    arg_type = data.get_uint8()
    value_arg = (arg_type >> 5)
    value_type = (arg_type & 31)
    self.value_type = ValueFormat(value_type)
    self.value = None
    size = (value_arg + 1)
    if (value_type == VALUE_BYTE):
        if (value_arg != 0):
            raise ValueError(('VALUE_BYTE value_arg != 0 (%u)' % value_arg))
        self.value = data.get_sint8()
    elif (value_type == VALUE_SHORT):
        self.value = data.get_sint_size(size)
    elif (value_type == VALUE_CHAR):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_INT):
        self.value = data.get_sint_size(size)
    elif (value_type == VALUE_LONG):
        self.value = data.get_sint_size(size)
    elif (value_type == VALUE_FLOAT):
        raise ValueError('VALUE_FLOAT not supported yet')
    elif (value_type == VALUE_DOUBLE):
        raise ValueError('VALUE_DOUBLE not supported yet')
    elif (value_type == VALUE_METHOD_TYPE):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_METHOD_HANDLE):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_STRING):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_TYPE):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_FIELD):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_METHOD):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_ENUM):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_ARRAY):
        if (value_arg != 0):
            raise ValueError(('VALUE_ARRAY value_arg != 0 (%u)' % value_arg))
        raise ValueError('VALUE_ARRAY not supported yet')
    elif (value_type == VALUE_ANNOTATION):
        if (value_arg != 0):
            raise ValueError(('VALUE_ANNOTATION value_arg != 0 (%u)' % value_arg))
    elif (value_type == VALUE_NULL):
        if (value_arg != 0):
            raise ValueError(('VALUE_ARRAY value_arg != 0 (%u)' % value_arg))
        self.value = 0
    elif (value_type == VALUE_BOOLEAN):
        if (size == 0):
            self.value = False
        else:
            self.value = (data.get_uint8() != 0)
def __init__(self, data):
    arg_type = data.get_uint8()
    value_arg = (arg_type >> 5)
    value_type = (arg_type & 31)
    self.value_type = ValueFormat(value_type)
    self.value = None
    size = (value_arg + 1)
    if (value_type == VALUE_BYTE):
        if (value_arg != 0):
            raise ValueError(('VALUE_BYTE value_arg != 0 (%u)' % value_arg))
        self.value = data.get_sint8()
    elif (value_type == VALUE_SHORT):
        self.value = data.get_sint_size(size)
    elif (value_type == VALUE_CHAR):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_INT):
        self.value = data.get_sint_size(size)
    elif (value_type == VALUE_LONG):
        self.value = data.get_sint_size(size)
    elif (value_type == VALUE_FLOAT):
        raise ValueError('VALUE_FLOAT not supported yet')
    elif (value_type == VALUE_DOUBLE):
        raise ValueError('VALUE_DOUBLE not supported yet')
    elif (value_type == VALUE_METHOD_TYPE):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_METHOD_HANDLE):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_STRING):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_TYPE):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_FIELD):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_METHOD):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_ENUM):
        self.value = data.get_uint_size(size)
    elif (value_type == VALUE_ARRAY):
        if (value_arg != 0):
            raise ValueError(('VALUE_ARRAY value_arg != 0 (%u)' % value_arg))
        raise ValueError('VALUE_ARRAY not supported yet')
    elif (value_type == VALUE_ANNOTATION):
        if (value_arg != 0):
            raise ValueError(('VALUE_ANNOTATION value_arg != 0 (%u)' % value_arg))
    elif (value_type == VALUE_NULL):
        if (value_arg != 0):
            raise ValueError(('VALUE_ARRAY value_arg != 0 (%u)' % value_arg))
        self.value = 0
    elif (value_type == VALUE_BOOLEAN):
        if (size == 0):
            self.value = False
        else:
            self.value = (data.get_uint8() != 0)