java.lang.Object
org.jorigin.plugin.DefaultPlugger
- All Implemented Interfaces:
IPlugger
This class is a default implementation of the
IPlugger interface.
The extension points are stored in an underlying HashMap.- Since:
- 1.0.0
- Version:
- "1.0.14" - b202111241200L
- Author:
- Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddExtensionPoint(String key, Object extensionPoint) Add a new extension point to the plugger.getExensionPoint(String key) Return the extension point referenced by the given key.String[]Return all the keys identifying extension points.
-
Constructor Details
-
DefaultPlugger
public DefaultPlugger()Create a new default plugger.
-
-
Method Details
-
addExtensionPoint
Description copied from interface:IPluggerAdd a new extension point to the plugger. The extension point is assigned to the key given. If the key is already affected to another extension point, the new extension point is not added.- Specified by:
addExtensionPointin interfaceIPlugger- Parameters:
key- the key of the extension point to addextensionPoint- the extension point to add- Returns:
- true if the extension point is added, false otherwise
-
getExensionPoint
Description copied from interface:IPluggerReturn the extension point referenced by the given key. If the key does not patch a plugin,nullis returned.- Specified by:
getExensionPointin interfaceIPlugger- Parameters:
key- the key of the extension point.- Returns:
- the extension point.
-
getExtensionPointKeys
Description copied from interface:IPluggerReturn all the keys identifying extension points.- Specified by:
getExtensionPointKeysin interfaceIPlugger- Returns:
- an array of String representing the key referencing extension points.
-