Subpackage
Defines the rules for which subpackages or a module to check and whether the classes in those subpackages can access the classes in other subpackages either for the same module, or for modules that are referenced ( org.springframework.context.annotation.Import ed) directly or transitively.
API
interface Subpackage {
String getName() (1)
List<String> mayBeAccessedBySubpackagesInSameModule() (2)
List<String> mayBeAccessedBySubpackagesInReferencingModules() (3)
String packageIdentifier()
}
1 | getName()
The name of the subpackage, for example "dom", "api", "spi" or "fixtures". |
2 | mayBeAccessedBySubpackagesInSameModule()
A list of the (names of the) subpackages where classes in the same module as this package have access. |
3 | mayBeAccessedBySubpackagesInReferencingModules()
A list of the (names of the) subpackages where classes in the packages of other referencing modules may have access. |
Members
mayBeAccessedBySubpackagesInSameModule()
A list of the (names of the) subpackages where classes in the same module as this package have access.
For example, the "dom" subpackage can probably be referenced from the "menu" subpackage, but not vice versa.
The special value of "*" is a wildcard meaning that all subpackages (in the same module) can access.
mayBeAccessedBySubpackagesInReferencingModules()
A list of the (names of the) subpackages where classes in the packages of other referencing modules may have access.
For example, in some cases the the "dom" subpackage may not be accessible from other modules if the intention is to require all programmatic access through an "api" subpackage (where the classes in dom
implement interfaces defined in api
).
The special value of "*" is a wildcard meaning that all subpackages (in other modules) can access.