- java.lang.Object
-
- org.jorigin.plugin.DefaultPlugger
-
- All Implemented Interfaces:
IPlugger
public class DefaultPlugger extends Object implements IPlugger
This class is a default implementation of theIPluggerinterface. The extension points are stored in an underlyingHashMap.- 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 Constructor Description DefaultPlugger()Create a new default plugger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddExtensionPoint(String key, Object extensionPoint)Add a new extension point to the plugger.ObjectgetExensionPoint(String key)Return the extension point referenced by the given key.String[]getExtensionPointKeys()Return all the keys identifying extension points.
-
-
-
Method Detail
-
addExtensionPoint
public boolean addExtensionPoint(String key, Object extensionPoint)
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
public Object getExensionPoint(String key)
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
public String[] 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.
-
-