Interface PackageInfo
-
- All Superinterfaces:
AnnotationTarget,DeclarationInfo
public interface PackageInfo extends DeclarationInfo
A package, possibly annotated inpackage-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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PackageInfoasPackage()Returns this declaration as a package.default DeclarationInfo.Kindkind()Returns the kind of this declaration.Stringname()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 Detail
-
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
default DeclarationInfo.Kind kind()
Description copied from interface:DeclarationInfoReturns the kind of this declaration.- Specified by:
kindin interfaceDeclarationInfo- Returns:
- the kind of this declaration
-
asPackage
default PackageInfo asPackage()
Description copied from interface:DeclarationInfoReturns this declaration as a package.- Specified by:
asPackagein interfaceDeclarationInfo- Returns:
- this package, never
null
-
-