# Uses of Interface
java.lang.constant.PackageDesc

Packages that use PackageDesc
Package
Description
java.lang.classfile.attribute
Provides interfaces describing `class` file attributes for the `java.lang.classfile` library.
java.lang.classfile.constantpool
Provides interfaces describing constant pool entries for the `java.lang.classfile` library.
java.lang.constant
Classes and interfaces to represent nominal descriptors for run-time entities such as classes or method handles, and classfile entities such as constant pool entries or `invokedynamic` call sites.

## Uses of PackageDesc in java.lang.classfile.attribute

Methods in java.lang.classfile.attribute with parameters of type PackageDesc
Modifier and Type
Method
Description
`ModuleAttribute.ModuleAttributeBuilder`
ModuleAttribute.ModuleAttributeBuilder.`exports(PackageDesc pkge, int exportsFlagsMask, ModuleDesc... exportsToModules)`
Adds an exported package.
`default ModuleAttribute.ModuleAttributeBuilder`
ModuleAttribute.ModuleAttributeBuilder.`exports(PackageDesc pkge, Collection<AccessFlag> exportsFlags, ModuleDesc... exportsToModules)`
Adds an exported package.
`static ModuleExportInfo`
ModuleExportInfo.`of(PackageDesc exports, int exportFlags, ModuleDesc... exportsTo)`
Returns a module export description.
`static ModuleExportInfo`
ModuleExportInfo.`of(PackageDesc exports, int exportFlags, List<ModuleDesc> exportsTo)`
Returns a module export description.
`static ModuleExportInfo`
ModuleExportInfo.`of(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo)`
Returns a module export description.
`static ModuleExportInfo`
ModuleExportInfo.`of(PackageDesc exports, Collection<AccessFlag> exportFlags, List<ModuleDesc> exportsTo)`
Returns a module export description.
`static ModuleOpenInfo`
ModuleOpenInfo.`of(PackageDesc opens, int opensFlags, ModuleDesc... opensTo)`
Returns a module open description.
`static ModuleOpenInfo`
ModuleOpenInfo.`of(PackageDesc opens, int opensFlags, List<ModuleDesc> opensTo)`
Returns a module open description.
`static ModuleOpenInfo`
ModuleOpenInfo.`of(PackageDesc opens, Collection<AccessFlag> opensFlags, ModuleDesc... opensTo)`
Returns a module open description.
`static ModuleOpenInfo`
ModuleOpenInfo.`of(PackageDesc opens, Collection<AccessFlag> opensFlags, List<ModuleDesc> opensTo)`
Returns a module open description.
`static ModulePackagesAttribute`
ModulePackagesAttribute.`ofNames(PackageDesc... packages)`
Returns a `ModulePackages` attribute.
`ModuleAttribute.ModuleAttributeBuilder`
ModuleAttribute.ModuleAttributeBuilder.`opens(PackageDesc pkge, int opensFlagsMask, ModuleDesc... opensToModules)`
Opens a package.
`default ModuleAttribute.ModuleAttributeBuilder`
ModuleAttribute.ModuleAttributeBuilder.`opens(PackageDesc pkge, Collection<AccessFlag> opensFlags, ModuleDesc... opensToModules)`
Opens a package.
Method parameters in java.lang.classfile.attribute with type arguments of type PackageDesc
Modifier and Type
Method
Description
`static ModulePackagesAttribute`
ModulePackagesAttribute.`ofNames(List<PackageDesc> packages)`
Returns a `ModulePackages` attribute.

## Uses of PackageDesc in java.lang.classfile.constantpool

Methods in java.lang.classfile.constantpool that return PackageDesc
Modifier and Type
Method
Description
`PackageDesc`
PackageEntry.`asSymbol()`
Returns a symbolic descriptor for the package name.
Methods in java.lang.classfile.constantpool with parameters of type PackageDesc
Modifier and Type
Method
Description
`boolean`
PackageEntry.`matches(PackageDesc desc)`
Returns whether this entry describes the given package.
`default PackageEntry`
ConstantPoolBuilder.`packageEntry(PackageDesc packageDesc)`
Returns a `PackageEntry` describing the same package as the provided `PackageDesc`.

## Uses of PackageDesc in java.lang.constant

Methods in java.lang.constant that return PackageDesc
Modifier and Type
Method
Description
`static PackageDesc`
PackageDesc.`of(String name)`
Returns a `PackageDesc` for a package, given the name of the package, such as `"java.lang"`.
`static PackageDesc`
PackageDesc.`ofInternalName(String name)`
Returns a `PackageDesc` for a package, given the name of the package in internal form, such as `"java/lang"`.