com.ibm.ws.container.service.annotations

Interface WebAnnotations


  1. public interface WebAnnotations
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:
  • DeployedModule adapt to ClassSource_Aggregate
  • DeployedModule adapt to AnnotationTargets_Targets
  • 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 and Description
  1. void
closeInfoStore()
Helper to close the info store.
  1. AnnotationTargets_Targets
getAnnotationTargets()
Answer the main annotation targets of the module.
  1. ClassInfo
getClassInfo(java.lang.String className)
Answer a class info object from the web module info store.
  1. ClassSource_Aggregate
getClassSource()
Answer the class source of the module.
  1. FragmentAnnotations
getFragmentAnnotations(WebFragmentInfo webFragmentItem)
Answer annotation targets generated from the module class source.
  1. InfoStore
getInfoStore()
Answer the common info store for the module.
  1. java.util.List<WebFragmentInfo>
getOrderedItems()
  1. SpecificAnnotations
getSpecificAnnotations(java.util.Set<java.lang.String> specificClassNames)
Answer annotation targets generated from the module class source.
  1. boolean
isExcludedClass(java.lang.String className)
Tell if the target class was scanned from an excluded location.
  1. boolean
isIncludedClass(java.lang.String className)
Tell if the target class was scanned from an included fragment.
  1. boolean
isPartialClass(java.lang.String className)
Tell if the target class was scanned from a partial (metadata-complete) fragment.
  1. void
openInfoStore()
Helper to open the info store.

Method Detail

getOrderedItems

  1. java.util.List<WebFragmentInfo> getOrderedItems( )
  2. throws UnableToAdaptException
Returns:
Throws:
UnableToAdaptException

getClassSource

  1. ClassSource_Aggregate getClassSource( )
  2. throws 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:
UnableToAdaptException - Thrown by an error processing fragment paths.
See Also:
#getOrderedFragmentPaths(), #getIncludedFragmentPaths(), #getExcludedFragmentPaths()

getAnnotationTargets

  1. AnnotationTargets_Targets getAnnotationTargets( )
  2. throws 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:
UnableToAdaptException - Thrown by an error processing fragment paths.
See Also:

isIncludedClass

  1. boolean isIncludedClass(java.lang.String className)
  2. throws UnableToAdaptException

Tell if the target class was scanned from an included fragment.

Parameters:
className - The name of the target class.
Returns:
True if the target class was scanned from an included fragment. Otherwise, false.
Throws:
UnableToAdaptException - Thrown by an error processing fragment paths.

isPartialClass

  1. boolean isPartialClass(java.lang.String className)
  2. throws UnableToAdaptException

Tell if the target class was scanned from a partial (metadata-complete) fragment.

Parameters:
className - The name of the target class.
Returns:
True if the target class was scanned from a partial fragment. Otherwise, false.
Throws:
UnableToAdaptException - Thrown by an error processing fragment paths.

isExcludedClass

  1. boolean isExcludedClass(java.lang.String className)
  2. throws UnableToAdaptException

Tell if the target class was scanned from an excluded location.

Parameters:
className - The name of the target class.
Returns:
True if the target class was scanned from an excluded location. Otherwise, false.
Throws:
UnableToAdaptException - Thrown by an error processing fragment paths.

getFragmentAnnotations

  1. FragmentAnnotations getFragmentAnnotations( WebFragmentInfo webFragmentItem)
  2. throws UnableToAdaptException

Answer annotation targets generated from the module class source. Scan only the classes in the specified fragment.

Use the common class source for this scan.

Parameters:
webFragmentItem - The fragment which is to be scanned.
Returns:
Class list specific annotation targets for the module.
Throws:
UnableToAdaptException - Thrown by an error processing fragment paths.

getSpecificAnnotations

  1. SpecificAnnotations getSpecificAnnotations( java.util.Set<java.lang.String> specificClassNames)
  2. throws 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:
UnableToAdaptException - Thrown by an error processing fragment paths.
See Also:

getInfoStore

  1. InfoStore getInfoStore()
  2. throws 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:
UnableToAdaptException - Thrown by an error processing fragment paths.

openInfoStore

  1. void openInfoStore()
  2. throws 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:
UnableToAdaptException - Thrown if the open failed. Often, because of a problem opening a ZIP or a JAR file.

closeInfoStore

  1. void closeInfoStore()
  2. throws UnableToAdaptException

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

Throws:
UnableToAdaptException - Thrown if the open failed. Often, because of a problem opening a ZIP or a JAR file.

getClassInfo

  1. ClassInfo getClassInfo(java.lang.String className)
  2. throws 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:
UnableToAdaptException - Thrown if a non-recoverable error occurred while retrieving the class info object.