Module java.base

Interface PackageDesc


public sealed interface PackageDesc
A nominal descriptor for a Package constant.

To create a PackageDesc for a package, use the of(String) or ofInternalName(String) method.

See Java Virtual Machine Specification:
4.4.12 The CONSTANT_Package_info Structure
Since:
21
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compare the specified object with this descriptor for equality.
    Returns the fully qualified (slash-separated) package name in internal form of this PackageDesc.
    default String
    Returns the fully qualified (dot-separated) package name of this PackageDesc.
    of(String name)
    Returns a PackageDesc for a package, given the name of the package, such as "java.lang".
    Returns a PackageDesc for a package, given the name of the package in internal form, such as "java/lang".