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 DeclarationInfo
DeclarationInfo.Kind -
Method Summary
Modifier and TypeMethodDescriptiondefault PackageInfoReturns this declaration as a package.default DeclarationInfo.Kindkind()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 AnnotationTarget
annotation, annotations, annotations, hasAnnotation, hasAnnotation, repeatableAnnotationMethods inherited from interface 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:DeclarationInfoReturns the kind of this declaration.- Specified by:
kindin interfaceDeclarationInfo- Returns:
- the kind of this declaration
-
asPackage
Description copied from interface:DeclarationInfoReturns this declaration as a package.- Specified by:
asPackagein interfaceDeclarationInfo- Returns:
- this package, never
null
-