@Override
    protected int getId(Class<?> clazz)
    {
        if (Message.class.isAssignableFrom(clazz))
        {
            final BaseHS<?> wrapper = pojoMapping.get(clazz);
            if (wrapper == null)
                throw new UnknownTypeException("pojo: " + clazz);

            return (wrapper.id << 5) | CID_POJO;
        }

        if (Map.class.isAssignableFrom(clazz))
            return EnumMap.class.isAssignableFrom(clazz) ? CID_ENUM_MAP : mapId(clazz);

        if (Collection.class.isAssignableFrom(clazz))
            return EnumSet.class.isAssignableFrom(clazz) ? CID_ENUM_SET : collectionId(clazz);

        final BaseHS<?> wrapper = pojoMapping.get(clazz);
        if (wrapper == null)
            throw new UnknownTypeException("pojo: " + clazz);

        return (wrapper.id << 5) | CID_POJO;
    }
Register a {@link Delegate} and assign an id.
<p>
Delegate ids start at 1.
protostuff-runtime-registry/src/main/java/io/protostuff/runtime/ExplicitIdStrategy.java