Package org.jorigin.plugin
Class DefaultPlugger
- java.lang.Object
-
- org.jorigin.plugin.DefaultPlugger
-
- All Implemented Interfaces:
IPlugger
public class DefaultPlugger extends java.lang.Object implements IPlugger
This class is a default implementation of theIPluggerinterface. The extension points are stored in an underlyingHashMap.- Since:
- 1.0.0
- Author:
- Julien Seinturier - (c) 2009 - JOrigin project - http:/www.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(java.lang.String key, java.lang.Object extensionPoint)Add a new extension point to the plugger.java.lang.ObjectgetExensionPoint(java.lang.String key)Return the extension point referenced by the given key.java.lang.String[]getExtensionPointKeys()Return all the keys identifying extension points.
-
-
-
Method Detail
-
addExtensionPoint
public boolean addExtensionPoint(java.lang.String key, java.lang.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 java.lang.Object getExensionPoint(java.lang.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 java.lang.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.
-
-