Interface ModuleAnnotations


public interface ModuleAnnotations
Main link for web module annotation related services. The annotation services type acts as a Future, as a Future, and as a Future, with the sharing of a single class source between the other two futures. Current references are from: com.ibm.ws.webcontainer.osgi.DeployedModImpl.adapt(Class) That adapt implementation provides three entries into the annotation services:
  1. DeployedModule adapt to ClassSource_Aggregate
  2. DeployedModule adapt to AnnotationTargets_Targets
  3. DeployedModule adapt to ClassSource
Notification plan: Adaptation to annotation targets requires a possibly time consuming scan. Informational messages are generated for the initiation of a scan, and for the completion of a scan.

Note on fragment paths:

These are specified through a complete, ordered, list, and through the partition of that list into included partial and excluded locations. Seed locations are fragment jars which are neither metadata-complete nor were excluded because they were omitted from an absolute ordering. Partial locations are those which are metadata-complete and not omitted from an absolute ordering. Excluded locations are those which were omitted because an absolute ordering is specified, and no others element is specified. The excluded locations are those which were not specified in the absolute ordering explicit listing.

Note that exclusion has precedence over metadata-complete.

Fragment paths are relative to the "WEB-INF/lib" folder, not to the rot web module container.

Included locations are scanned for annotations and for class relationship information. Partial locations are scanned only for class relationship information. Excluded locations are scanned only for class relationship information, and only as required to complete class relationship information for referenced classes.

Class relationship information is the class to superclass and the class to implements relationships.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    Helper to close the info store.
    com.ibm.wsspi.anno.targets.AnnotationTargets_Targets
    Answer the main annotation targets of the module.
    com.ibm.wsspi.anno.info.ClassInfo
    getClassInfo(String className)
    Answer a class info object from the web module info store.
    com.ibm.wsspi.anno.classsource.ClassSource_Aggregate
    Answer the class source of the module.
    com.ibm.wsspi.anno.info.InfoStore
    Answer the common info store for the module.
    getSpecificAnnotations(Set<String> specificClassNames)
    Answer annotation targets generated from the module class source.
    void
    Helper to open the info store.
  • Method Details

    • getClassSource

      com.ibm.wsspi.anno.classsource.ClassSource_Aggregate getClassSource() throws com.ibm.wsspi.adaptable.module.UnableToAdaptException

      Answer the class source of the module. This includes the WEB-INF/classes location and all fragments, in their proper order. Only WEB-INF/classes and included fragments paths are marked as seed locations.

      Returns:
      The web module class source.
      Throws:
      com.ibm.wsspi.adaptable.module.UnableToAdaptException - Thrown by an error processing fragment paths.
    • getAnnotationTargets

      com.ibm.wsspi.anno.targets.AnnotationTargets_Targets getAnnotationTargets() throws com.ibm.wsspi.adaptable.module.UnableToAdaptException

      Answer the main annotation targets of the module. This uses the common web module class source.

      Returns:
      The main annotation targets for the module.
      Throws:
      com.ibm.wsspi.adaptable.module.UnableToAdaptException - Thrown by an error processing fragment paths.
      See Also:
    • addAppClassLoader

      void addAppClassLoader(ClassLoader appClassLoader)
    • getSpecificAnnotations

      SpecificAnnotations getSpecificAnnotations(Set<String> specificClassNames) throws com.ibm.wsspi.adaptable.module.UnableToAdaptException

      Answer annotation targets generated from the module class source. Scan only the specific extra classes.

      Use the common class source for this scan.

      The specific targets is not stored in the non-persistent cache!

      Parameters:
      specificClassNames - The names of the specific class which are to be scanned.
      Returns:
      Class list specific annotation targets for the module.
      Throws:
      com.ibm.wsspi.adaptable.module.UnableToAdaptException - Thrown by an error processing fragment paths.
      See Also:
    • getInfoStore

      com.ibm.wsspi.anno.info.InfoStore getInfoStore() throws com.ibm.wsspi.adaptable.module.UnableToAdaptException

      Answer the common info store for the module. This uses the common web module class source.

      Returns:
      The common info store for the module.
      Throws:
      com.ibm.wsspi.adaptable.module.UnableToAdaptException - Thrown by an error processing fragment paths.
    • openInfoStore

      void openInfoStore() throws com.ibm.wsspi.adaptable.module.UnableToAdaptException

      Helper to open the info store. This is recommended if many calls are expected to getClassInfo(String). Opening the info store speeds class lookups, with a cost of retaining resources in the underlying file access layer.

      A call to open the info store requires a call to close the info store following all accesses.

      Throws:
      com.ibm.wsspi.adaptable.module.UnableToAdaptException - Thrown if the open failed. Often, because of a problem opening a ZIP or a JAR file.
    • closeInfoStore

      void closeInfoStore() throws com.ibm.wsspi.adaptable.module.UnableToAdaptException

      Helper to close the info store. This is required at the completion of using the info store.

      Throws:
      com.ibm.wsspi.adaptable.module.UnableToAdaptException - Thrown if the open failed. Often, because of a problem opening a ZIP or a JAR file.
    • getClassInfo

      com.ibm.wsspi.anno.info.ClassInfo getClassInfo(String className) throws com.ibm.wsspi.adaptable.module.UnableToAdaptException

      Answer a class info object from the web module info store.

      Parameters:
      className - The name of the class for which to retrieve a class info object.
      Returns:
      The class info object for the named class.
      Throws:
      com.ibm.wsspi.adaptable.module.UnableToAdaptException - Thrown if a non-recoverable error occurred while retrieving the class info object.