Class AbstractExtensionFinder
- All Implemented Interfaces:
EventListener
,ExtensionFinder
,PluginStateListener
- Direct Known Subclasses:
LegacyExtensionFinder
,ServiceProviderExtensionFinder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Boolean
protected Map
<String, ExtensionInfo> private static final org.slf4j.Logger
protected PluginManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkDifferentClassLoaders
(Class<?> type, Class<?> extensionClass) private ExtensionWrapper
createExtensionWrapper
(Class<?> extensionClass) protected void
debugExtensions
(Set<String> extensions) <T> List
<ExtensionWrapper<T>> Retrieves a list with all extensions found for an extension point.<T> List
<ExtensionWrapper<T>> Retrieves a list with all extensions found for an extension point and a plugin.Retrieves a list with all extensions found for a pluginfindClassNames
(String pluginId) Retrieves a list with all extension class names found for a plugin.private Extension
findExtensionAnnotation
(Class<?> clazz) private ExtensionInfo
getExtensionInfo
(String className, ClassLoader classLoader) Returns the parameters of anExtension
annotation without loading the corresponding class into the class loader.final boolean
Returns true, if the extension finder checks extensions for its required plugins.void
Invoked when a plugin's state (for example DISABLED, STARTED) is changed.void
setCheckForExtensionDependencies
(boolean checkForExtensionDependencies) Plugin developers may enable / disable checks for required plugins of an extension.
-
Field Details
-
log
private static final org.slf4j.Logger log -
pluginManager
-
entries
-
extensionInfos
-
checkForExtensionDependencies
-
-
Constructor Details
-
AbstractExtensionFinder
-
-
Method Details
-
readPluginsStorages
-
readClasspathStorages
-
find
Description copied from interface:ExtensionFinder
Retrieves a list with all extensions found for an extension point.- Specified by:
find
in interfaceExtensionFinder
-
find
Description copied from interface:ExtensionFinder
Retrieves a list with all extensions found for an extension point and a plugin.- Specified by:
find
in interfaceExtensionFinder
-
find
Description copied from interface:ExtensionFinder
Retrieves a list with all extensions found for a plugin- Specified by:
find
in interfaceExtensionFinder
-
findClassNames
Description copied from interface:ExtensionFinder
Retrieves a list with all extension class names found for a plugin.- Specified by:
findClassNames
in interfaceExtensionFinder
-
pluginStateChanged
Description copied from interface:PluginStateListener
Invoked when a plugin's state (for example DISABLED, STARTED) is changed.- Specified by:
pluginStateChanged
in interfacePluginStateListener
-
isCheckForExtensionDependencies
public final boolean isCheckForExtensionDependencies()Returns true, if the extension finder checks extensions for its required plugins. This feature has to be enabled, in order check the availability ofExtension.plugins()
configured by an extension.This feature is enabled by default, if at least one available plugin makes use of optional plugin dependencies. Those optional plugins might not be available at runtime. Therefore any extension is checked by default against available plugins before its instantiation.
Notice: This feature requires the optional ASM library to be available on the applications classpath.
- Returns:
- true, if the extension finder checks extensions for its required plugins
-
setCheckForExtensionDependencies
public void setCheckForExtensionDependencies(boolean checkForExtensionDependencies) Plugin developers may enable / disable checks for required plugins of an extension. This feature has to be enabled, in order check the availability ofExtension.plugins()
configured by an extension.This feature is enabled by default, if at least one available plugin makes use of optional plugin dependencies. Those optional plugins might not be available at runtime. Therefore any extension is checked by default against available plugins before its instantiation.
Notice: This feature requires the optional ASM library to be available on the applications classpath.
- Parameters:
checkForExtensionDependencies
- true to enable checks for optional extensions, otherwise false
-
debugExtensions
-
readStorages
-
getEntries
-
getExtensionInfo
Returns the parameters of anExtension
annotation without loading the corresponding class into the class loader. -
createExtensionWrapper
-
findExtensionAnnotation
-
checkDifferentClassLoaders
-