Annotation Interface PrivilegedExport


@MinMuleVersion("4.1") @Target(TYPE) @Retention(RUNTIME) @Documented public @interface PrivilegedExport
Specifies packages that an extension should expose beyond the default ClassLoader isolation.

This annotation's usage is optional. This annotation's purpose is to allow access to classes that are not part of the public extension's API in border cases. Using this annotation should not be something usual. When needed, this annotation should be placed on the same class that is annotated with Extension

The referenced packages will be visible only by the listed artifacts.USE WITH CARE, negligent use of this annotation could result in class path issues when exported classes conflict with those in the runtime or other extensions consuming the referenced packages.

Since:
1.0
  • Element Details

    • packages

      String[] packages
      Returns:
      The additional Java packages that should be exported as privileged API
      Default:
      {}
    • artifacts

      String[] artifacts
      Returns:
      The artifacts that have access to the privileged API. Each artifact is defined using Maven's groupId:artifactId.
      Default:
      {}