Named Packages
A package declaration in a compilation unit specifies the name of the package
to which the compilation unit belongs.
PackageDeclaration:
Annotationsopt package PackageName ;
The keyword package may optionally be preceded by annotation modifiers
If an annotation a on a package declaration corresponds to an annotation
type T, and T has a (meta-)annotation m that corresponds to annotation.Target,
then m must have an element whose value is annotation.Element-
Type.PACKAGE, or a compile-time error occurs.
The package name mentioned in a package declaration must be the fully qualified
name of the package.
A package declaration in a compilation unit specifies the name of the package
to which the compilation unit belongs.
PackageDeclaration:
Annotationsopt package PackageName ;
The keyword package may optionally be preceded by annotation modifiers
If an annotation a on a package declaration corresponds to an annotation
type T, and T has a (meta-)annotation m that corresponds to annotation.Target,
then m must have an element whose value is annotation.Element-
Type.PACKAGE, or a compile-time error occurs.
The package name mentioned in a package declaration must be the fully qualified
name of the package.
0 comments:
Post a Comment