protected ObjectSerializer<?> getSerializer(Object obj) {
        for (int i = serializers.size() - 1; i >= 0; i--) {
            ObjectSerializer<?> sr = serializers.get(i);
            if (sr.canSerialize(obj)) return sr;
            
        }
        throw new RuntimeException("Serializer not found for " + obj + " of type " + obj.getClass());
    }
Layout serializer for buffers

@author Riccardo Balbo
jme3-core/src/main/java/com/jme3/shader/bufferobject/layout/BufferLayout.java