Class ExtensionPoints

java.lang.Object
nz.org.riskscape.engine.IdentifiedCollection.Base<ExtensionPoint<?>>
nz.org.riskscape.engine.plugin.ExtensionPoints
All Implemented Interfaces:
IdentifiedCollection<ExtensionPoint<?>>

public class ExtensionPoints extends IdentifiedCollection.Base<ExtensionPoint<?>>
  • Constructor Details

    • ExtensionPoints

      public ExtensionPoints()
  • Method Details

    • getFeaturesOfType

      public <T extends PluginFeature> List<T> getFeaturesOfType(Class<T> featureClass)
      Returns:
      a list of all the features registered to extension points with the given feature class
    • addExtensionPoint

      public void addExtensionPoint(Class<? extends PluginFeature> featureClass)

      Convenience method for adding an extension point by its feature class

    • addFeature

      public boolean addFeature(PluginFeature feature)

      Add a feature to this set of extension points, returning false if none of the extension points supported this feature. Note that a feature can potentially implement multiple Feature SPIs, so can be added to more than one ExtensionPoint