public interface WebAnnotations
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.
Modifier and Type | Method and Description |
---|---|
void |
closeInfoStore()
Helper to close the info store.
|
com.ibm.wsspi.anno.targets.AnnotationTargets_Targets |
getAnnotationTargets()
Answer the main annotation targets of the module.
|
com.ibm.wsspi.anno.info.ClassInfo |
getClassInfo(java.lang.String className)
Answer a class info object from the web module info store.
|
com.ibm.wsspi.anno.classsource.ClassSource_Aggregate |
getClassSource()
Answer the class source of the module.
|
java.util.List<WebFragmentInfo> |
getExcludedItems()
Answer the list of excluded fragment items.
|
FragmentAnnotations |
getFragmentAnnotations(WebFragmentInfo webFragmentItem)
Answer annotation targets generated from the module class source.
|
com.ibm.wsspi.anno.info.InfoStore |
getInfoStore()
Answer the common info store for the module.
|
java.util.List<WebFragmentInfo> |
getOrderedItems()
Answer the ordered list of fragment items.
|
SpecificAnnotations |
getSpecificAnnotations(java.util.Set<java.lang.String> specificClassNames)
Answer annotation targets generated from the module class source.
|
boolean |
isExcludedClass(java.lang.String className)
Tell if the target class was scanned from an excluded location.
|
boolean |
isExternalClass(java.lang.String className)
Tell if the target class was scanned from an external location.
|
boolean |
isIncludedClass(java.lang.String className)
Tell if the target class was scanned from an included fragment.
|
boolean |
isPartialClass(java.lang.String className)
Tell if the target class was scanned from a partial (metadata-complete) fragment.
|
void |
openInfoStore()
Helper to open the info store.
|
java.util.List<WebFragmentInfo> getOrderedItems() throws com.ibm.wsspi.adaptable.module.UnableToAdaptException
com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown in case of an error processing fragment metadata.java.util.List<WebFragmentInfo> getExcludedItems() throws com.ibm.wsspi.adaptable.module.UnableToAdaptException
com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown in case of an error processing fragment metadata.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.
com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.#getOrderedFragmentPaths()
,
#getIncludedFragmentPaths()
,
#getExcludedFragmentPaths()
,
#getExternalFragmentPaths()
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.
com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.getClassSource()
boolean isIncludedClass(java.lang.String className) throws com.ibm.wsspi.adaptable.module.UnableToAdaptException
Tell if the target class was scanned from an included fragment.
className
- The name of the target class.com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.boolean isPartialClass(java.lang.String className) throws com.ibm.wsspi.adaptable.module.UnableToAdaptException
Tell if the target class was scanned from a partial (metadata-complete) fragment.
className
- The name of the target class.com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.boolean isExcludedClass(java.lang.String className) throws com.ibm.wsspi.adaptable.module.UnableToAdaptException
Tell if the target class was scanned from an excluded location.
className
- The name of the target class.com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.boolean isExternalClass(java.lang.String className) throws com.ibm.wsspi.adaptable.module.UnableToAdaptException
Tell if the target class was scanned from an external location.
className
- The name of the target class.com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.FragmentAnnotations getFragmentAnnotations(WebFragmentInfo webFragmentItem) throws com.ibm.wsspi.adaptable.module.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.
webFragmentItem
- The fragment which is to be scanned.com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.SpecificAnnotations getSpecificAnnotations(java.util.Set<java.lang.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!
specificClassNames
- The names of the specific class which are to be scanned.com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.getClassSource()
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.
com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown by an error processing fragment paths.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.
com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown if the open failed. Often, because of
a problem opening a ZIP or a JAR file.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.
com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown if the open failed. Often, because of
a problem opening a ZIP or a JAR file.com.ibm.wsspi.anno.info.ClassInfo getClassInfo(java.lang.String className) throws com.ibm.wsspi.adaptable.module.UnableToAdaptException
Answer a class info object from the web module info store.
className
- The name of the class for which to retrieve a class info object.com.ibm.wsspi.adaptable.module.UnableToAdaptException
- Thrown if a non-recoverable error occurred while
retrieving the class info object.