Class DefaultPlugger

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 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 Details

    • DefaultPlugger

      public DefaultPlugger()
      Create a new default plugger.
  • Method Details

    • addExtensionPoint

      public boolean addExtensionPoint(String key, Object extensionPoint)
      Description copied from interface: IPlugger
      Add 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:
      addExtensionPoint in interface IPlugger
      Parameters:
      key - the key of the extension point to add
      extensionPoint - 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: IPlugger
      Return the extension point referenced by the given key. If the key does not patch a plugin, null is returned.
      Specified by:
      getExensionPoint in interface IPlugger
      Parameters:
      key - the key of the extension point.
      Returns:
      the extension point.
    • getExtensionPointKeys

      public String[] getExtensionPointKeys()
      Description copied from interface: IPlugger
      Return all the keys identifying extension points.
      Specified by:
      getExtensionPointKeys in interface IPlugger
      Returns:
      an array of String representing the key referencing extension points.