public static String prunedName(PluginDesc<?> plugin) {
        // It's currently simpler to switch on type than do pattern matching.
        switch (plugin.type()) {
            case SOURCE:
            case SINK:
                return prunePluginName(plugin, "Connector");
            default:
                return prunePluginName(plugin, plugin.type().simpleName());
        }
    }
Remove the plugin type name at the end of a plugin class name, if such suffix is present.
This method is meant to be used to extract plugin aliases.

@param plugin the plugin descriptor.
@return the pruned simple class name of the plugin.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java