类 ExtensionLoader<T>

    • 方法详细资料

      • getExtensionName

        public String getExtensionName(T extensionInstance)
      • getExtensionName

        public String getExtensionName(Class<?> extensionClass)
      • getActivateExtension

        public List<T> getActivateExtension(URL url,
                                            String[] values,
                                            String group)
        Get activate extensions.
        参数:
        url - url
        values - extension point names
        group - group
        返回:
        extension list which are activated
        另请参阅:
        Activate
      • getLoadedExtension

        public T getLoadedExtension(String name)
        Get extension's instance. Return null if extension is not found or is not initialized. Pls. note that this method will not trigger extension load.

        In order to trigger extension load, call getExtension(String) instead.

        另请参阅:
        getExtension(String)
      • getExtension

        public T getExtension(String name)
        Find the extension with the given name. If the specified name is not found, then IllegalStateException will be thrown.
      • getDefaultExtension

        public T getDefaultExtension()
        Return default extension, return null if it's not configured.
      • hasExtension

        public boolean hasExtension(String name)
      • getSupportedExtensions

        public Set<String> getSupportedExtensions()
      • getDefaultExtensionName

        public String getDefaultExtensionName()
        Return default extension name, return null if not configured.
      • addExtension

        public void addExtension(String name,
                                 Class<?> clazz)
        Register new extension via API
        参数:
        name - extension name
        clazz - extension class
        抛出:
        IllegalStateException - when extension with the same name has already been registered.
      • replaceExtension

        @Deprecated
        public void replaceExtension(String name,
                                     Class<?> clazz)
        已过时。
        not recommended any longer, and use only when test
        Replace the existing extension via API
        参数:
        name - extension name
        clazz - extension class
        抛出:
        IllegalStateException - when extension to be placed doesn't exist
      • getAdaptiveExtension

        public T getAdaptiveExtension()