Annotation Type WhitelistPackage


@API(status=EXPERIMENTAL)
@Documented
@Retention(RUNTIME)
@Target({METHOD,TYPE,ANNOTATION_TYPE})
@Repeatable(WhitelistPackages.class)
public @interface WhitelistPackage
Allows to whitelist a package, possibly including all subpackages. The ArtemisSecurityManager will allow access for non-whitelisted callers outside the set of whitelisted packages. This annotation is Repeatable, and can be placed additively on the test class and test method.

You can use * and ** in the same way as in GLOB patterns just applied to packages where the delimiter is ".".

Use e.g. @BlacklistPackage("java.util") to allow access to all classes in the package java.util and @BlacklistPackage("java.util**") to allow access to classes in java.util and all its subpackages.

The access to java.lang is always allowed and by default, all packages can be used, apart from java.lang.reflect, and internal packages of AJTS.

This annotation overpowers any BlacklistPackage annotations.

Since:
0.5.1
Version:
1.1.0
Author:
Christian Femers
  • Required Element Summary

    Required Elements 
    Modifier and Type Required Element Description
    java.lang.String value  
  • Element Details

    • value

      java.lang.String value