Qwylt

java.lang.module.spi
Class ModuleInfo

java.lang.Object
  extended by java.lang.module.spi.ModuleInfo
All Implemented Interfaces:
java.lang.Iterable<ModuleInfo.Directive>, java.lang.reflect.AnnotatedElement

public class ModuleInfo
extends java.lang.Object
implements java.lang.reflect.AnnotatedElement, java.lang.Iterable<ModuleInfo.Directive>

Low level accessor for module-info.class file data. Validation and interpretation is deferred to the ModuleSystem selected by the specified set of module system identifiers.

Since:
Jun 29, 2009
Author:
Bryan Atsatt, Mark Reinhold

Nested Class Summary
static class ModuleInfo.Directive
           
static class ModuleInfo.Term
           
 
Constructor Summary
ModuleInfo(byte[] moduleInfoClassFile)
           
ModuleInfo(ModuleInfo.Term moduleID, java.util.List<ModuleInfo.Term> moduleAttributes, java.util.List<ModuleInfo.Directive> directives, java.lang.reflect.AnnotatedElement annotations)
           
 
Method Summary
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.Class<T> annotationClass)
           
 java.lang.annotation.Annotation[] getAnnotations()
           
 java.lang.reflect.AnnotatedElement getAnnotationSource()
           
 java.lang.annotation.Annotation[] getDeclaredAnnotations()
           
 java.util.List<ModuleInfo.Directive> getDirectives()
           
 java.util.List<ModuleInfo.Term> getModuleAttributes()
           
 ModuleInfo.Term getModuleID()
           
 boolean hasAnnotations()
           
 boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
           
 java.util.Iterator<ModuleInfo.Directive> iterator()
           
 java.lang.String toString()
          Returns a string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleInfo

public ModuleInfo(ModuleInfo.Term moduleID,
                  java.util.List<ModuleInfo.Term> moduleAttributes,
                  java.util.List<ModuleInfo.Directive> directives,
                  java.lang.reflect.AnnotatedElement annotations)

ModuleInfo

public ModuleInfo(byte[] moduleInfoClassFile)
Method Detail

getModuleID

public ModuleInfo.Term getModuleID()

getModuleAttributes

public java.util.List<ModuleInfo.Term> getModuleAttributes()

getDirectives

public java.util.List<ModuleInfo.Directive> getDirectives()

iterator

public java.util.Iterator<ModuleInfo.Directive> iterator()
Specified by:
iterator in interface java.lang.Iterable<ModuleInfo.Directive>

hasAnnotations

public boolean hasAnnotations()

isAnnotationPresent

public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Specified by:
isAnnotationPresent in interface java.lang.reflect.AnnotatedElement

getAnnotation

public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
Specified by:
getAnnotation in interface java.lang.reflect.AnnotatedElement

getAnnotations

public java.lang.annotation.Annotation[] getAnnotations()
Specified by:
getAnnotations in interface java.lang.reflect.AnnotatedElement

getDeclaredAnnotations

public java.lang.annotation.Annotation[] getDeclaredAnnotations()
Specified by:
getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElement

getAnnotationSource

public java.lang.reflect.AnnotatedElement getAnnotationSource()

toString

public java.lang.String toString()
Returns a string representation of this instance.

Overrides:
toString in class java.lang.Object
Returns:
The string.

Qwylt

Send comments or questions to Bryan Atsatt