public static SerializerRegistration registerClass(Class cls, Serializer serializer) {
        SerializerRegistration existingReg = getExactSerializerRegistration(cls);

        short id;
        if (existingReg != null) { 
            id = existingReg.getId();
        } else {
            id = nextId();
        }            
        return registerClassForId( id, cls, serializer );
    }
@deprecated This cannot be implemented in a reasonable way that works in
             all deployment methods.
jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java