public static SerializerRegistration registerClassForId( short id, Class cls, Serializer serializer ) {
 
        if( locked ) {
            throw new RuntimeException("Serializer registry locked trying to register class:" + cls);
        }
 
        SerializerRegistration reg = new SerializerRegistration(serializer, cls, id);        

        idRegistrations.put(id, reg);
        classRegistrations.put(cls, reg);
        
        log.log( Level.FINE, "Registered class[" + id + "]:{0} to:" + serializer, cls );

        serializer.initialize(cls);

        // Add the class after so that dependency order is preserved if the
        // serializer registers its own classes.
        registrations.add(reg);

        return reg;    
    }
Directly registers a class for a specific ID.  Generally, use the regular
 registerClass() method.  This method is intended for framework code that might
 be maintaining specific ID maps across client and server.
jme3-networking/src/main/java/com/jme3/network/serializing/Serializer.java