Package org.pf4j
Class ManifestPluginDescriptorFinder
- java.lang.Object
-
- org.pf4j.ManifestPluginDescriptorFinder
-
- All Implemented Interfaces:
PluginDescriptorFinder
public class ManifestPluginDescriptorFinder extends java.lang.Object implements PluginDescriptorFinder
Read the plugin descriptor from the manifest file.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Loggerlogstatic java.lang.StringPLUGIN_CLASSstatic java.lang.StringPLUGIN_DEPENDENCIESstatic java.lang.StringPLUGIN_DESCRIPTIONstatic java.lang.StringPLUGIN_IDstatic java.lang.StringPLUGIN_LICENSEstatic java.lang.StringPLUGIN_PROVIDERstatic java.lang.StringPLUGIN_REQUIRESstatic java.lang.StringPLUGIN_VERSION
-
Constructor Summary
Constructors Constructor Description ManifestPluginDescriptorFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PluginDescriptorcreatePluginDescriptor(java.util.jar.Manifest manifest)protected DefaultPluginDescriptorcreatePluginDescriptorInstance()PluginDescriptorfind(java.nio.file.Path pluginPath)protected java.nio.file.PathgetManifestPath(java.nio.file.Path pluginPath)booleanisApplicable(java.nio.file.Path pluginPath)Returns true if this finder is applicable to the givenPath.protected java.util.jar.ManifestreadManifest(java.nio.file.Path pluginPath)
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
PLUGIN_ID
public static final java.lang.String PLUGIN_ID
- See Also:
- Constant Field Values
-
PLUGIN_DESCRIPTION
public static final java.lang.String PLUGIN_DESCRIPTION
- See Also:
- Constant Field Values
-
PLUGIN_CLASS
public static final java.lang.String PLUGIN_CLASS
- See Also:
- Constant Field Values
-
PLUGIN_VERSION
public static final java.lang.String PLUGIN_VERSION
- See Also:
- Constant Field Values
-
PLUGIN_PROVIDER
public static final java.lang.String PLUGIN_PROVIDER
- See Also:
- Constant Field Values
-
PLUGIN_DEPENDENCIES
public static final java.lang.String PLUGIN_DEPENDENCIES
- See Also:
- Constant Field Values
-
PLUGIN_REQUIRES
public static final java.lang.String PLUGIN_REQUIRES
- See Also:
- Constant Field Values
-
PLUGIN_LICENSE
public static final java.lang.String PLUGIN_LICENSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isApplicable
public boolean isApplicable(java.nio.file.Path pluginPath)
Description copied from interface:PluginDescriptorFinderReturns true if this finder is applicable to the givenPath.- Specified by:
isApplicablein interfacePluginDescriptorFinder
-
find
public PluginDescriptor find(java.nio.file.Path pluginPath)
- Specified by:
findin interfacePluginDescriptorFinder
-
readManifest
protected java.util.jar.Manifest readManifest(java.nio.file.Path pluginPath)
-
getManifestPath
protected java.nio.file.Path getManifestPath(java.nio.file.Path pluginPath)
-
createPluginDescriptor
protected PluginDescriptor createPluginDescriptor(java.util.jar.Manifest manifest)
-
createPluginDescriptorInstance
protected DefaultPluginDescriptor createPluginDescriptorInstance()
-
-