Using the STL exporter as an example for my addon UI

I’m writing a level exporter for my scene to an XML file. I’m trying to make an extensive and clean UI for this exporter. I’ve been looking at the STL exporter addon, which defines some (collapsable) Panels (main, include, transform, geometry). However, I don’t really understand how those Panels are integrated/linked into the addon UI.

The only way I can imagine this working, is by having this in the exporter class:

    bl_idname = "export_mesh.stl"

and this in the Panels:

    def poll(cls, context):
        sfile = context.space_data
        operator = sfile.active_operator

        return operator.bl_idname == "EXPORT_MESH_OT_stl"

So by setting the bl_idname of the operator to “export_mesh.stl”, it is recognised by the Panel by checking if operator.bl_idname equals “EXPORT_MESH_OT_stl”. So “export_mesh.stl” automatically gets converted to “EXPORT_MESH_OT_stl” somehow. And the Panels appear in the exporter in the order they are registered to the application.

Is this correct? Is there more information about this coupling available somewhere? Maybe some less obscure way of doing this? TIA!