|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.reflect.Superpackage
public final class Superpackage
Instances of the class Superpackage
represent superpackages
in a running Java application.
Superpackage
has no public constructor. Instead Superpackage
objects are constructed automatically by the Java Virtual Machine as superpackages
are loaded and by calls to the defineSuperpackage
method in the class
loader.
Class.getSuperpackage()
,
ClassLoader.findSuperpackage(String)
Nested Class Summary | |
---|---|
static class |
Superpackage.exports
temporary for superpackage definition until javac support arrives |
static class |
Superpackage.members
temporary for superpackage definition until javac support arrives |
static class |
Superpackage.uses
temporary for superpackage definition until javac support arrives |
Method Summary | ||
---|---|---|
|
getAnnotation(Class<A> annotationClass)
|
|
Annotation[] |
getAnnotations()
|
|
ClassLoader |
getClassLoader()
Returns the class loader for the superpackage. |
|
Annotation[] |
getDeclaredAnnotations()
|
|
Superpackage |
getEnclosingSuperpackage()
Returns the immediately enclosing superpackage of the underlying superpackage. |
|
Superpackage[] |
getExportedSuperpackages()
Returns an array of Superpackage objects reflecting the exported superpackages that are a direct member of this superpackage. |
|
String[] |
getExportedTypes()
Returns an array of String objects reflecting the binary names of all exported classes and interfaces that are a direct member of this superpackage. |
|
|
getImportAnnotation(String importName,
Class<A> annotationClass)
Temporary, not in superpackage strawman |
|
Set<String> |
getImported()
Temporary, not in superpackage strawman |
|
Superpackage[] |
getMemberSuperpackages()
Returns an array of Superpackage objects reflecting the superpackages that are a direct member of this superpackage. |
|
String[] |
getMemberTypes()
Returns an array of String objects reflecting the binary names of all classes and interfaces that are a direct member of this superpackage. |
|
String |
getName()
Returns the fully qualified name of this superpackage. |
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass)
|
|
String |
toString()
Converts the object to a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public String getName()
public String[] getMemberTypes()
The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the superpackage has no direct members that are types.
public Superpackage[] getMemberSuperpackages()
The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the superpackage has no members that are superpackages
public String[] getExportedTypes()
getMemberTypes()
.
The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the superpackage has no direct members that are exported types.
public Superpackage[] getExportedSuperpackages()
getMemberSuperpackages()
.
The elements in the array returned are not sorted and are not in any particular order. This method returns an array of length 0 if the superpackage has no direct members that are exported superpackages.
public Superpackage getEnclosingSuperpackage()
public ClassLoader getClassLoader()
If a security manager is present, and the caller's class loader is
not null and the caller's class loader is not the same as or an ancestor of
the class loader for the superpackage whose class loader is requested, then
this method calls the security manager's checkPermission
method with a RuntimePermission("getClassLoader")
permission to ensure it's ok to access the class loader for the superpackage.
SecurityException
- if a security manager exists and its
checkPermission
method denies
access to the class loader for the superpackage.ClassLoader
,
SecurityManager.checkPermission(java.security.Permission)
,
RuntimePermission
public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
getAnnotation
in interface AnnotatedElement
NullPointerException
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
isAnnotationPresent
in interface AnnotatedElement
NullPointerException
public Annotation[] getAnnotations()
getAnnotations
in interface AnnotatedElement
public Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations
in interface AnnotatedElement
public String toString()
getName
.
toString
in class Object
public Set<String> getImported()
public <A extends Annotation> A getImportAnnotation(String importName, Class<A> annotationClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |