private static int getPrimitiveOrScalarId(Class<?> clazz, int id)
    {
        if (clazz.isPrimitive())
            return id - 1;

        // if id < 9, its the primitive's boxed type.
        return id < 9 ? ((id - 1) | 0x08) : (id + 7);
    }
Base class for numeric id strategies.

@author David Yu
@created Mar 28, 2012
protostuff-runtime-registry/src/main/java/io/protostuff/runtime/NumericIdStrategy.java