public Object toIdObject(String baseId) throws ActiveMQAMQPIllegalStateException {
  if (baseId == null) {
    return null;
  }
  try {
    if (hasAmqpUuidPrefix(baseId)) {
      String uuidString=strip(baseId,AMQP_UUID_PREFIX_LENGTH);
      return UUID.fromString(uuidString);
    }
 else     if (hasAmqpUlongPrefix(baseId)) {
      String longString=strip(baseId,AMQP_ULONG_PREFIX_LENGTH);
      return UnsignedLong.valueOf(longString);
    }
 else     if (hasAmqpStringPrefix(baseId)) {
      return strip(baseId,AMQP_STRING_PREFIX_LENGTH);
    }
 else     if (hasAmqpBinaryPrefix(baseId)) {
      String hexString=strip(baseId,AMQP_BINARY_PREFIX_LENGTH);
      byte[] bytes=convertHexStringToBinary(hexString);
      return new Binary(bytes);
    }
 else {
      return baseId;
    }
  }
 catch (  IllegalArgumentException e) {
    throw new ActiveMQAMQPIllegalStateException("Unable to convert ID value");
  }
}

public Object toIdObject ( String baseId ) throws ActiveMQAMQPIllegalStateException { if ( baseId == null ) { return null ; } try { if ( hasAmqpUuidPrefix ( baseId ) ) { String uuidString = strip ( baseId , AMQP_UUID_PREFIX_LENGTH ) ; return UUID . fromString ( uuidString ) ; } else if ( hasAmqpUlongPrefix ( baseId ) ) { String longString = strip ( baseId , AMQP_ULONG_PREFIX_LENGTH ) ; return UnsignedLong . valueOf ( longString ) ; } else if ( hasAmqpStringPrefix ( baseId ) ) { return strip ( baseId , AMQP_STRING_PREFIX_LENGTH ) ; } else if ( hasAmqpBinaryPrefix ( baseId ) ) { String hexString = strip ( baseId , AMQP_BINARY_PREFIX_LENGTH ) ; byte [ ] bytes = convertHexStringToBinary ( hexString ) ; return new Binary ( bytes ) ; } else { return baseId ; } } catch ( IllegalArgumentException e ) { throw new ActiveMQAMQPIllegalStateException ( "Unable to convert ID value" ) ; } }
takes the provided base id string and return the appropriate amqp messageid style object . converts the type based on any relevant encoding information found as a prefix .
