class ExtensionLoader {

    public void addListener(ExtensionLoaderListener<T> listener) {
        synchronized (this) {
            if (!listeners.contains(listener)) {
                this.listeners.add(listener);
                for (ExtensionClass<T> value : all.values()) {
                    try {
                        listener.onLoad(value);
                    } catch (Exception e) {
                        if (LOGGER.isDebugEnabled()) {
                            LOGGER.debug("Error when notify listener  of extensible " + interfaceClass +
                                " with alias: "
                                + value.getAlias() + ".", e);
                        }
                    }
                }
            }
        }

    }

    public  ExtensionLoader(Class<T> interfaceClass, ExtensionLoaderListener<T> listener);
    protected  ExtensionLoader(Class<T> interfaceClass);
    protected  ExtensionLoader(Class<T> interfaceClass, boolean autoLoad, ExtensionLoaderListener<T> listener);

}