Interface PackageInfo
- All Superinterfaces:
AnnotationTarget
,DeclarationInfo
A package, possibly annotated in
package-info.java
.
Obtaining the set of members present in this package is not possible.- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.enterprise.lang.model.declarations.DeclarationInfo
DeclarationInfo.Kind
-
Method Summary
Modifier and TypeMethodDescriptiondefault PackageInfo
Returns this declaration as a package.default DeclarationInfo.Kind
kind()
Returns the kind of this declaration.name()
Returns the fully qualified name of this package, as defined by The Java™ Language Specification; in other words, the package name as returned byPackage.getName()
.Methods inherited from interface jakarta.enterprise.lang.model.AnnotationTarget
annotation, annotations, annotations, hasAnnotation, hasAnnotation, repeatableAnnotation
Methods inherited from interface jakarta.enterprise.lang.model.declarations.DeclarationInfo
asClass, asDeclaration, asField, asMethod, asParameter, asRecordComponent, asType, isClass, isDeclaration, isField, isMethod, isPackage, isParameter, isRecordComponent, isType
-
Method Details
-
name
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 byPackage.getName()
.- Returns:
- fully qualified name of this package, never
null
-
kind
Description copied from interface:DeclarationInfo
Returns the kind of this declaration.- Specified by:
kind
in interfaceDeclarationInfo
- Returns:
- the kind of this declaration
-
asPackage
Description copied from interface:DeclarationInfo
Returns this declaration as a package.- Specified by:
asPackage
in interfaceDeclarationInfo
- Returns:
- this package, never
null
-