public class PackageInfo extends java.lang.Object implements java.lang.Comparable<PackageInfo>, HasName
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PackageInfo o) |
boolean |
equals(java.lang.Object obj) |
AnnotationInfoList |
getAnnotationInfo()
Get any annotations on the
package-info.class file. |
AnnotationInfo |
getAnnotationInfo(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Get a the annotation on this package, or null if the package does not have the annotation.
|
AnnotationInfo |
getAnnotationInfo(java.lang.String annotationName)
Get a the named annotation on this package, or null if the package does not have the named annotation.
|
PackageInfoList |
getChildren()
The child packages of this package, or the empty list if none.
|
ClassInfoList |
getClassInfo()
Get the
ClassInfo objects for all classes that are members of this package. |
ClassInfo |
getClassInfo(java.lang.String className)
Get the
ClassInfo object for the named class in this package, or null if the class was not found in
this package. |
ClassInfoList |
getClassInfoRecursive()
Get the
ClassInfo objects for all classes that are members of this package or a sub-package. |
java.lang.String |
getName()
The package name ("" for the root package).
|
PackageInfo |
getParent()
The parent package of this package, or null if this is the root package.
|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
Check if the package has the annotation.
|
boolean |
hasAnnotation(java.lang.String annotationName)
Check if the package has the named annotation.
|
int |
hashCode() |
java.lang.String |
toString() |
public java.lang.String getName()
public AnnotationInfo getAnnotationInfo(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
annotation - The annotation.AnnotationInfo object representing the annotation on this package, or null if the package
does not have the annotation.public AnnotationInfo getAnnotationInfo(java.lang.String annotationName)
annotationName - The annotation name.AnnotationInfo object representing the named annotation on this package, or null if the
package does not have the named annotation.public AnnotationInfoList getAnnotationInfo()
package-info.class file.package-info.class file.public boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
annotation - The annotation.public boolean hasAnnotation(java.lang.String annotationName)
annotationName - The name of an annotation.public PackageInfo getParent()
public PackageInfoList getChildren()
public ClassInfo getClassInfo(java.lang.String className)
ClassInfo object for the named class in this package, or null if the class was not found in
this package.className - the class nameClassInfo object for the named class in this package, or null if the class was not found
in this package.public ClassInfoList getClassInfo()
ClassInfo objects for all classes that are members of this package.ClassInfo objects for all classes that are members of this package.public ClassInfoList getClassInfoRecursive()
ClassInfo objects for all classes that are members of this package or a sub-package.ClassInfo objects for all classes that are members of this package or a sub-package.public int compareTo(PackageInfo o)
compareTo in interface java.lang.Comparable<PackageInfo>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object