Top Description Methods
jakarta.enterprise.lang.model.declarations

public Interface PackageInfo

extends DeclarationInfo

A package, possibly annotated in package-info.java. Obtaining the set of members present in this package is not possible.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public default PackageInfo
public default DeclarationInfo.Kind
kind()

Implements jakarta.enterprise.lang.model.declarations.DeclarationInfo.kind.

Returns the kind of this declaration.

public String

Returns:

fully qualified name of this package, never null
name
()

Returns the fully qualified name of this package, as defined by The Java™ Language Specification; in other words, the package name as returned by Package#getName().

Inherited from jakarta.enterprise.lang.model.declarations.DeclarationInfo:
asClassasDeclarationasFieldasMethodasParameterasRecordComponentasTypeisClassisDeclarationisFieldisMethodisPackageisParameterisRecordComponentisType

Method Detail

asPackageback to summary
public default PackageInfo asPackage()

Overrides default jakarta.enterprise.lang.model.declarations.DeclarationInfo.asPackage.

Doc from jakarta.enterprise.lang.model.declarations.DeclarationInfo.asPackage.

Returns this declaration as a package.

Returns:PackageInfo

this package, never null

Annotations
@Override
kindback to summary
public default DeclarationInfo.Kind kind()

Implements jakarta.enterprise.lang.model.declarations.DeclarationInfo.kind.

Doc from jakarta.enterprise.lang.model.declarations.DeclarationInfo.kind.

Returns the kind of this declaration.

Returns:DeclarationInfo.Kind

the kind of this declaration

Annotations
@Override
nameback to summary
public String name()

Returns the fully qualified name of this package, as defined by The Java™ Language Specification; in other words, the package name as returned by Package#getName().

Returns:String

fully qualified name of this package, never null