Package Visibility

The extended CAP file format offers more flexibility for the package visibility as follows:

  • Each public package inside a CAP file has an AID and version. This AID and version uniquely identify this package when a package in another CAP file is importing it.

  • Private packages inside a CAP file or packages that have no exported information (like an applet package with no Shareable interfaces) have no AID and version. In addition, because nothing is exported, the Converter does not generate an export file. Packages in other CAP files imports nothing from such packages.

  • Unlike in an applet compact CAP file, if an extended CAP file is an applet CAP file, then the public library packages that are contained in the CAP file are exported as if they were present in a compact CAP file. In addition, the public applet packages contained in an extended CAP file are exported individually based on the same rules as for the compact CAP files (only public Shareable interfaces).

  • Packages inside a bundle are visible to each other and the standard Java access rules (public, protected, package, or private) apply, irrespective of whether the packages are public or private.