Package org.pf4j

Annotation Type Extension


  • @Retention(RUNTIME)
    @Target(TYPE)
    @Inherited
    @Documented
    public @interface Extension
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int ordinal  
      java.lang.String[] plugins
      An array of plugin IDs, that have to be available in order to load this extension.
      java.lang.Class<? extends ExtensionPoint>[] points
      An array of extension points, that are implemented by this extension.
    • Element Detail

      • ordinal

        int ordinal
        Default:
        0
      • points

        java.lang.Class<? extends ExtensionPoint>[] points
        An array of extension points, that are implemented by this extension. This explicit configuration overrides the automatic detection of extension points in the ExtensionAnnotationProcessor.

        In case your extension is directly derived from an extension point this attribute is NOT required. But under certain more complex scenarios it might be useful to explicitly set the extension points for an extension.

        Returns:
        classes of extension points, that are implemented by this extension
        Default:
        {}
      • plugins

        java.lang.String[] plugins
        An array of plugin IDs, that have to be available in order to load this extension. The AbstractExtensionFinder won't load this extension, if these plugins are not available / started at runtime.

        Notice: This feature requires the optional ASM library to be available on the applications classpath and has to be explicitly enabled via AbstractExtensionFinder.setCheckForExtensionDependencies(boolean).

        Returns:
        plugin IDs, that have to be available in order to load this extension
        Default:
        {}