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.Logger
log
static java.lang.String
PLUGIN_CLASS
static java.lang.String
PLUGIN_DEPENDENCIES
static java.lang.String
PLUGIN_DESCRIPTION
static java.lang.String
PLUGIN_ID
static java.lang.String
PLUGIN_LICENSE
static java.lang.String
PLUGIN_PROVIDER
static java.lang.String
PLUGIN_REQUIRES
static java.lang.String
PLUGIN_VERSION
-
Constructor Summary
Constructors Constructor Description ManifestPluginDescriptorFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PluginDescriptor
createPluginDescriptor(java.util.jar.Manifest manifest)
protected DefaultPluginDescriptor
createPluginDescriptorInstance()
PluginDescriptor
find(java.nio.file.Path pluginPath)
protected java.nio.file.Path
getManifestPath(java.nio.file.Path pluginPath)
boolean
isApplicable(java.nio.file.Path pluginPath)
Returns true if this finder is applicable to the givenPath
.protected java.util.jar.Manifest
readManifest(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:PluginDescriptorFinder
Returns true if this finder is applicable to the givenPath
.- Specified by:
isApplicable
in interfacePluginDescriptorFinder
-
find
public PluginDescriptor find(java.nio.file.Path pluginPath)
- Specified by:
find
in 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()
-
-