Interface AnnotationTargets_Targets
-
public interface AnnotationTargets_Targets
Annotation targets tables. Results include package source information, class source information, class relationship information and annotation targets information.
Package source information consists of a listing of packages partitioned by the class source which provided each package.
Class source information consists of a listing of classes partitioned by the class source which provided each class.
Class relationship information consists of class to interface relationships and class to superclass relationships.
Annotation information consists of the recording of package, class, field, and method annotation occurrences. Results are stored as mappings of package and class names to annotation names. Detail values for the annotation occurrences are not recorded. The particular target field or methods of the occurrences are not recorded.
Results are partitioned by scan policy (see
ClassSource_Aggregate.ScanPolicy
), respectively, SEED, PARTIAL, EXCLUDED, and EXTERNAL. For non-web module cases, only SEED and EXTERNAL apply. Web module cases use PARTIAL and EXCLUDED for particular cases involving metadata-complete fragment jars and for particular cases involving web module jars which were excluded by their omittion from an absolute ordering specified for the web module.Classes are recorded for SEED, PARTIAL, and EXCLUDED regions. Classes are recorded for EXTERNAL regions only as needed to complete class relationship information.
Annotations occurrences are recorded for SEED, PARTIAL, and EXCLUDED regions. Annotation occurrences are omitted from EXTERNAL regions.
Annotation selection queries default to select SEED results, unless an explicit selection policy is specified. When specified, the selection policy is the bitwise OR of scan policy values. Results are selected from all regions which are included in specified policy.
Helpers are available for selecting classes which are the target of inherited class annotations. Particular care must be used when selecting such classes. The helpers may be used for non-inheritable class annotations, but will obtain meaningless results. Using the helpers, usually, the regions used to select the classes declaring annotations is the same as the region used to select the inheriting classes. However, the helpers allow these regions to be different.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AnnotationTargets_Targets.AnnotationCategory
Enumeration used for the several categories of annotations.
-
Field Summary
Fields Modifier and Type Field Description static int
POLICY_ALL_EXCEPT_EXTERNAL
Synonym forClassSource_Aggregate.ScanPolicy.ALL_EXCEPT_EXTERNAL
.static int
POLICY_EXCLUDED
Synonym for the value ofClassSource_Aggregate.ScanPolicy.EXCLUDED
.static int
POLICY_EXTERNAL
Synonym for the value ofClassSource_Aggregate.ScanPolicy.EXTERNAL
.static int
POLICY_PARTIAL
Synonym for the value ofClassSource_Aggregate.ScanPolicy.PARTIAL
.static int
POLICY_SEED
Synonym for the value ofClassSource_Aggregate.ScanPolicy.SEED
.static int
POLICY_SEED_AND_PARTIAL
Synonym forClassSource_Aggregate.ScanPolicy.SEED
OR'ed withClassSource_Aggregate.ScanPolicy.PARTIAL
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addClassSource(ClassSource classSource, ClassSource_Aggregate.ScanPolicy scanPolicy)
Add a class source to the aggregate class source held by this targets table.java.util.Set<java.lang.String>
getAllImplementorsOf(java.lang.String interfaceName)
Answer the names of all the implementors of a target interface.java.util.Set<java.lang.String>
getAllInheritedAnnotatedClasses(java.lang.String annotationName)
Utility for inherited class annotations: Find classes which have the specified class annotation, or which are a subclass of a class which has the specified class annotation.java.util.Set<java.lang.String>
getAllInheritedAnnotatedClasses(java.lang.String annotationName, int scanPolicies)
Utility for inherited class annotations.java.util.Set<java.lang.String>
getAllInheritedAnnotatedClasses(java.lang.String annotationName, int declarerScanPolicies, int inheritorScanPolicies)
Utility for inherited class annotations.java.util.Set<java.lang.String>
getAnnotatedClasses()
Answer the names of classes having class annotations.java.util.Set<java.lang.String>
getAnnotatedClasses(int scanPolicies)
Answer the names of classes having class annotations.java.util.Set<java.lang.String>
getAnnotatedClasses(java.lang.String annotationName)
Answer the names of classes having the specified annotation.java.util.Set<java.lang.String>
getAnnotatedClasses(java.lang.String annotationName, int scanPolicies)
Answer the names of classes having the specified annotation.java.util.Set<java.lang.String>
getAnnotatedClasses(java.lang.String classSourceName, java.lang.String annotationName)
Answer the names of the classes having the specified class annotation.java.util.Set<java.lang.String>
getAnnotatedClasses(java.lang.String classSourceName, java.lang.String annotationName, int scanPolicies)
Answer the names of the classes having the specified class annotation.java.util.Set<java.lang.String>
getAnnotatedPackages()
Answer the names of packages having annotations.java.util.Set<java.lang.String>
getAnnotatedPackages(int scanPolicies)
Answer the names of packages having annotations.java.util.Set<java.lang.String>
getAnnotatedPackages(java.lang.String annotationName)
Answer the names of packages having the specified annotation.java.util.Set<java.lang.String>
getAnnotatedPackages(java.lang.String annotationName, int scanPolicies)
Answer the names of packages having the specified annotation.java.util.Set<java.lang.String>
getClassAnnotations()
Answer all recorded SEED class annotations.java.util.Set<java.lang.String>
getClassAnnotations(int scanPolicies)
Answer the names of recorded class annotations.java.util.Set<java.lang.String>
getClassAnnotations(java.lang.String className)
Answer the class annotations of a specified class.java.util.Set<java.lang.String>
getClassAnnotations(java.lang.String className, int scanPolicies)
Answer the names of annotations on the specified class.java.util.Set<java.lang.String>
getClassesWithFieldAnnotation(java.lang.String annotationName)
Answer the names of the classes having any declared occurrence of the specified field annotation.java.util.Set<java.lang.String>
getClassesWithFieldAnnotation(java.lang.String annotationName, int scanPolicies)
Answer the names of the classes having any declared occurrence of the specified field annotation.java.util.Set<java.lang.String>
getClassesWithFieldAnnotations(int scanPolicies)
Answer the names of the classes having any declared occurrence of a field annotation.java.util.Set<java.lang.String>
getClassesWithMethodAnnotation(java.lang.String annotationName)
Answer the names of the classes having any declared occurrence of the specified method annotation.java.util.Set<java.lang.String>
getClassesWithMethodAnnotation(java.lang.String annotationName, int scanPolicies)
Answer the names of the classes having any declared occurrence of the specified method annotation.java.util.Set<java.lang.String>
getClassesWithMethodAnnotations(int scanPolicies)
Answer the names of the classes having any method annotations.java.util.Set<java.lang.String>
getClassNames(int scanPolicies)
Answer the class names in the specified regions.java.util.Set<java.lang.String>
getExcludedClassNames()
Answer the excluded class names.java.util.Set<java.lang.String>
getExternalClassNames()
Answer the external class names.AnnotationTargets_Factory
getFactory()
Answer the factory which was used to create this targets table.java.util.Set<java.lang.String>
getFieldAnnotations()
Answer the names of recorded field annotations.java.util.Set<java.lang.String>
getFieldAnnotations(int scanPolicies)
Answer the names of recorded field annotations.java.util.Set<java.lang.String>
getFieldAnnotations(java.lang.String className)
Answer the names of the field annotations recorded on the specified class.java.util.Set<java.lang.String>
getFieldAnnotations(java.lang.String className, int scanPolicies)
Answer the names of the field annotations recorded on the specified class.boolean
getIsDetailEnabled()
Tell if detail mode is enabled for the targets tables.java.util.Set<java.lang.String>
getMethodAnnotations()
Answer the names of the recorded annotations.java.util.Set<java.lang.String>
getMethodAnnotations(int scanPolicies)
Answer the names of the recorded method annotations.java.util.Set<java.lang.String>
getMethodAnnotations(java.lang.String className)
Answer the names of the method annotations recorded on the specified class.java.util.Set<java.lang.String>
getMethodAnnotations(java.lang.String className, int scanPolicies)
Answer the names of the method annotations recorded on the specified class.java.util.Set<java.lang.String>
getPackageAnnotations()
Answer all recorded SEED package annotations.java.util.Set<java.lang.String>
getPackageAnnotations(int scanPolicies)
Answer the names of recorded package annotations.java.util.Set<java.lang.String>
getPackageAnnotations(java.lang.String packageName)
Answer the annotations of a specified package.java.util.Set<java.lang.String>
getPackageAnnotations(java.lang.String packageName, int scanPolicies)
Answer the names of annotations on the specified package.java.util.Set<java.lang.String>
getPartialClassNames()
Answer the partial class names.java.util.Set<java.lang.String>
getSeedClassNames()
Answer the seed class names.java.util.Set<java.lang.String>
getSubclassNames(java.lang.String className)
Answer the name of all of the subclasses of a target class.java.lang.String
getSuperclassName(java.lang.String className)
Answer the name of the super class of a target class.boolean
isExcludedClassName(java.lang.String className)
Tell if a particular named class is an excluded class.boolean
isExternalClassName(java.lang.String className)
Tell if a particular named class is an external class.boolean
isInstanceOf(java.lang.String candidateClassName, java.lang.Class<?> criterionClass)
Tell if a candidate class is an instance of a specified class.boolean
isPartialClassName(java.lang.String className)
Tell if a particular named class is a partial class.boolean
isSeedClassName(java.lang.String className)
Tell if a particular named class is a seed class name.void
scan(ClassSource_Aggregate classSource)
Perform a scan of the specified class source, injecting scan data into the annotation targets.void
scan(ClassSource_Aggregate classSource, boolean greedy)
void
scan(ClassSource_Aggregate classSource, java.util.Set<java.lang.String> specificClassNames)
Perform a scan of the specified class source, injecting scan data into the annotation targets.
-
-
-
Field Detail
-
POLICY_ALL_EXCEPT_EXTERNAL
static final int POLICY_ALL_EXCEPT_EXTERNAL
Synonym for
ClassSource_Aggregate.ScanPolicy.ALL_EXCEPT_EXTERNAL
.
-
POLICY_SEED_AND_PARTIAL
static final int POLICY_SEED_AND_PARTIAL
Synonym for
ClassSource_Aggregate.ScanPolicy.SEED
OR'ed withClassSource_Aggregate.ScanPolicy.PARTIAL
.
-
POLICY_SEED
static final int POLICY_SEED
Synonym for the value of
ClassSource_Aggregate.ScanPolicy.SEED
.
-
POLICY_PARTIAL
static final int POLICY_PARTIAL
Synonym for the value of
ClassSource_Aggregate.ScanPolicy.PARTIAL
.
-
POLICY_EXCLUDED
static final int POLICY_EXCLUDED
Synonym for the value of
ClassSource_Aggregate.ScanPolicy.EXCLUDED
.
-
POLICY_EXTERNAL
static final int POLICY_EXTERNAL
Synonym for the value of
ClassSource_Aggregate.ScanPolicy.EXTERNAL
.
-
-
Method Detail
-
getFactory
AnnotationTargets_Factory getFactory()
Answer the factory which was used to create this targets table. Objects created from this targets table use this factory.
- Returns:
- The factory used to create this targets table.
-
addClassSource
void addClassSource(ClassSource classSource, ClassSource_Aggregate.ScanPolicy scanPolicy)
Add a class source to the aggregate class source held by this targets table.
- Parameters:
classSource
- The class source to add to this targets table.scanPolicy
- The policy to set for the class source.
-
getIsDetailEnabled
boolean getIsDetailEnabled()
Tell if detail mode is enabled for the targets tables. Field and method annotations are recorded only when detail mode is enabled.
At this time, detail mode is always enabled. A capability to enable/disable field and method annotation recording is provided as a future enhancement. A small performance gain is achieved by disabling field and method annotation recording. A small to large space savings is achieved by disabling field and method annotations, depending on the relative quantity of field and method annotations in the target scan space.
- Returns:
- True if detail mode is enabled. Otherwise, false.
-
scan
void scan(ClassSource_Aggregate classSource) throws AnnotationTargets_Exception
Perform a scan of the specified class source, injecting scan data into the annotation targets.
- Parameters:
classSource
- The class source which is to be scanned.- Throws:
AnnotationTargets_Exception
- Thrown if an error occurred during scanning.
-
scan
void scan(ClassSource_Aggregate classSource, java.util.Set<java.lang.String> specificClassNames) throws AnnotationTargets_Exception
Perform a scan of the specified class source, injecting scan data into the annotation targets. Scan only the specified classes.
- Parameters:
classSource
- The class source which is to be scanned.specificClassNames
- The names of the specific classes which are to be scanned.- Throws:
AnnotationTargets_Exception
- Thrown if an error occurred during scanning.
-
scan
void scan(ClassSource_Aggregate classSource, boolean greedy) throws AnnotationTargets_Exception
- Throws:
AnnotationTargets_Exception
-
isSeedClassName
boolean isSeedClassName(java.lang.String className)
Tell if a particular named class is a seed class name.
- Parameters:
className
- The class name to test.- Returns:
- True if the named class was scanned as a seed class. Otherwise, false.
getSeedClassNames()
-
getSeedClassNames
java.util.Set<java.lang.String> getSeedClassNames()
Answer the seed class names.
- Returns:
- The seed class names.
-
isPartialClassName
boolean isPartialClassName(java.lang.String className)
Tell if a particular named class is a partial class.
- Parameters:
className
- The class name to test.- Returns:
- True if the named class is a partial class. Otherwise, false.
getPartialClassNames()
-
getPartialClassNames
java.util.Set<java.lang.String> getPartialClassNames()
Answer the partial class names.
- Returns:
- The partial class names.
-
isExcludedClassName
boolean isExcludedClassName(java.lang.String className)
Tell if a particular named class is an excluded class.
- Parameters:
className
- The class name to test.- Returns:
- True if the named class is an excluded class. Otherwise, false.
getExcludedClassNames()
-
getExcludedClassNames
java.util.Set<java.lang.String> getExcludedClassNames()
Answer the excluded class names.
- Returns:
- The seed class names.
-
isExternalClassName
boolean isExternalClassName(java.lang.String className)
Tell if a particular named class is an external class.
- Parameters:
className
- The class name to test.- Returns:
- True if the named class is an external class. Otherwise, false.
getExternalClassNames()
-
getExternalClassNames
java.util.Set<java.lang.String> getExternalClassNames()
Answer the external class names.
- Returns:
- The external class names.
-
isInstanceOf
boolean isInstanceOf(java.lang.String candidateClassName, java.lang.Class<?> criterionClass)
Tell if a candidate class is an instance of a specified class.
- Parameters:
candidateClassName
- The name of the class to test.criterionClass
- The class to test against.- Returns:
- True if the candidate class is an instance of the criterion class. Otherwise, false.
-
getSuperclassName
java.lang.String getSuperclassName(java.lang.String className)
Answer the name of the super class of a target class. Answer null if the target class is java.lang.Object, or is an interface.
- Parameters:
className
- The name of the target class.- Returns:
- The name of the superclass of the target class.
-
getSubclassNames
java.util.Set<java.lang.String> getSubclassNames(java.lang.String className)
Answer the name of all of the subclasses of a target class.
- Parameters:
className
- The class for which to obtain subclass names.- Returns:
- The names of all subclasses of the target class.
-
getAllImplementorsOf
java.util.Set<java.lang.String> getAllImplementorsOf(java.lang.String interfaceName)
Answer the names of all the implementors of a target interface.
- Parameters:
interfaceName
- The name of the target interface.- Returns:
- The names of all implementers of the target interface.
-
getAnnotatedPackages
java.util.Set<java.lang.String> getAnnotatedPackages()
Answer the names of packages having annotations. Limit results to SEED packages.
- Returns:
- The names of the packages having annotations.
-
getAnnotatedPackages
java.util.Set<java.lang.String> getAnnotatedPackages(java.lang.String annotationName)
Answer the names of packages having the specified annotation. Limit results to SEED packages.
- Parameters:
annotationName
- The name of the annotation on which to select.- Returns:
- The names of the packages having the specified annotation.
-
getPackageAnnotations
java.util.Set<java.lang.String> getPackageAnnotations()
Answer all recorded SEED package annotations.
- Returns:
- The names of all recorded SEED package annotations.
-
getPackageAnnotations
java.util.Set<java.lang.String> getPackageAnnotations(java.lang.String packageName)
Answer the annotations of a specified package. Select from SEED results.
- Parameters:
packageName
- The name of the package for which to select annotations.- Returns:
- The names of annotations of the named package, selected from SEED results.
-
getAnnotatedClasses
java.util.Set<java.lang.String> getAnnotatedClasses()
Answer the names of classes having class annotations. Limit results to SEED classes.
- Returns:
- The names of the classes having class annotations.
-
getAnnotatedClasses
java.util.Set<java.lang.String> getAnnotatedClasses(java.lang.String annotationName)
Answer the names of classes having the specified annotation. Limit results to SEED classes.
- Parameters:
annotationName
- The name of the class annotation on which to select.- Returns:
- The names of the classes having the specified class annotation.
-
getClassAnnotations
java.util.Set<java.lang.String> getClassAnnotations()
Answer all recorded SEED class annotations.
- Returns:
- The names of all recorded SEED class annotations.
-
getClassAnnotations
java.util.Set<java.lang.String> getClassAnnotations(java.lang.String className)
Answer the class annotations of a specified class. Select from SEED results.
- Parameters:
className
- The name of the class for which to select class annotations.- Returns:
- The names of class annotations of the named class, selected from SEED results.
-
getClassesWithFieldAnnotation
java.util.Set<java.lang.String> getClassesWithFieldAnnotation(java.lang.String annotationName)
Answer the names of the classes having any declared occurrence of the specified field annotation. Select from within SEED results.
- Parameters:
annotationName
- The name of the field annotation on which to select.- Returns:
- The names of the classes having the specified field annotation.
-
getFieldAnnotations
java.util.Set<java.lang.String> getFieldAnnotations()
Answer the names of recorded field annotations. Select from within SEED results.
- Returns:
- The names of field annotations of the named class, selected from SEED results.
-
getFieldAnnotations
java.util.Set<java.lang.String> getFieldAnnotations(java.lang.String className)
Answer the names of the field annotations recorded on the specified class. Select from within SEED results.
- Parameters:
className
- The name of the class for which to select field annotations.- Returns:
- The names of field annotations of the named class, selected from SEED results.
-
getClassesWithMethodAnnotation
java.util.Set<java.lang.String> getClassesWithMethodAnnotation(java.lang.String annotationName)
Answer the names of the classes having any declared occurrence of the specified method annotation. Select from within SEED results.
- Parameters:
annotationName
- The name of the method annotation on which to select.- Returns:
- The names of the classes having the specified method annotation.
-
getMethodAnnotations
java.util.Set<java.lang.String> getMethodAnnotations()
Answer the names of the recorded annotations. Select from within SEED results.
- Returns:
- The names of method annotations, selected from SEED results.
-
getMethodAnnotations
java.util.Set<java.lang.String> getMethodAnnotations(java.lang.String className)
Answer the names of the method annotations recorded on the specified class. Select from within SEED results.
- Parameters:
className
- The name of the class for which to select method annotations.- Returns:
- The names of method annotations of the named class, selected from SEED results.
-
getAnnotatedClasses
java.util.Set<java.lang.String> getAnnotatedClasses(java.lang.String classSourceName, java.lang.String annotationName)
Answer the names of the classes having the specified class annotation. Limit the results to classes within the specified class source and to SEED results.
- Parameters:
classSourceName
- The name of the class source used to restrict the results.annotationName
- The name of the class annotation on which to select.- Returns:
- The names of the classes having the specified class annotation.
-
getAnnotatedClasses
java.util.Set<java.lang.String> getAnnotatedClasses(java.lang.String classSourceName, java.lang.String annotationName, int scanPolicies)
Answer the names of the classes having the specified class annotation. Limit the results to classes within the specified class source and to the specified results.
- Parameters:
classSourceName
- The name of the class source used to restrict the results.annotationName
- The name of the class annotation on which to select.scanPolicies
- The policies for which to select annotated classes, as bitwise OR of scan policy values.- Returns:
- The names of the classes having the specified class annotation.
-
getClassNames
java.util.Set<java.lang.String> getClassNames(int scanPolicies)
Answer the class names in the specified regions.
- Parameters:
scanPolicies
- The scan policies for which to select class names.- Returns:
- The names of all classes in the specified regions.
-
getAnnotatedPackages
java.util.Set<java.lang.String> getAnnotatedPackages(int scanPolicies)
Answer the names of packages having annotations. Limit results to the specified regions.
- Parameters:
scanPolicies
- The policies for which to select annotated packages, as bitwise OR of scan policy values.- Returns:
- The names of the packages having annotations.
-
getAnnotatedPackages
java.util.Set<java.lang.String> getAnnotatedPackages(java.lang.String annotationName, int scanPolicies)
Answer the names of packages having the specified annotation. Limit results to the specified regions.
- Parameters:
annotationName
- The name of the package annotation on which to select.scanPolicies
- The policies for which to select annotated packages, as bitwise OR of scan policy values.- Returns:
- The names of the packages having the specified annotation.
-
getPackageAnnotations
java.util.Set<java.lang.String> getPackageAnnotations(int scanPolicies)
Answer the names of recorded package annotations. Restrict results to only those recorded in the specified regions.
- Parameters:
scanPolicies
- The policies for which to select package annotations, as bitwise OR of scan policy values.- Returns:
- The names of recorded package annotations selected from the specified results.
-
getPackageAnnotations
java.util.Set<java.lang.String> getPackageAnnotations(java.lang.String packageName, int scanPolicies)
Answer the names of annotations on the specified package. Restrict results to only those recorded in the specified regions.
- Parameters:
packageName
- The name of the package for which to select annotations.scanPolicies
- The policies for which to select package annotations, as bitwise OR of scan policy values.- Returns:
- The names of annotations of the named package, selected from the specified results.
-
getAnnotatedClasses
java.util.Set<java.lang.String> getAnnotatedClasses(int scanPolicies)
Answer the names of classes having class annotations. Limit results to the specified regions.
- Parameters:
scanPolicies
- The policies for which to select annotated classes, as bitwise OR of scan policy values.- Returns:
- The names of the classes having class annotations.
-
getAnnotatedClasses
java.util.Set<java.lang.String> getAnnotatedClasses(java.lang.String annotationName, int scanPolicies)
Answer the names of classes having the specified annotation. Limit results to the specified regions.
- Parameters:
annotationName
- The name of the class annotation on which to select.scanPolicies
- The policies for which to select annotated classes, as bitwise OR of scan policy values.- Returns:
- The names of the classes having the specified class annotation.
-
getClassAnnotations
java.util.Set<java.lang.String> getClassAnnotations(int scanPolicies)
Answer the names of recorded class annotations. Restrict results to only those recorded in the specified regions.
- Parameters:
scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of recorded class annotations selected from the specified results.
-
getClassAnnotations
java.util.Set<java.lang.String> getClassAnnotations(java.lang.String className, int scanPolicies)
Answer the names of annotations on the specified class. Restrict results to only those recorded in the specified regions.
- Parameters:
className
- The name of the class for which to select class annotations.scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of class annotations of the named class, selected from the specified results.
-
getClassesWithFieldAnnotations
java.util.Set<java.lang.String> getClassesWithFieldAnnotations(int scanPolicies)
Answer the names of the classes having any declared occurrence of a field annotation. Select from within the specified results.
- Parameters:
scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of the classes having a field annotation.
-
getClassesWithFieldAnnotation
java.util.Set<java.lang.String> getClassesWithFieldAnnotation(java.lang.String annotationName, int scanPolicies)
Answer the names of the classes having any declared occurrence of the specified field annotation. Select from within the specified results.
- Parameters:
annotationName
- The name of the field annotation on which to select.scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of the classes having the specified field annotation.
-
getFieldAnnotations
java.util.Set<java.lang.String> getFieldAnnotations(int scanPolicies)
Answer the names of recorded field annotations. Select from within the specified results.
- Parameters:
scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of field annotations of the named class, selected from the specified results.
-
getFieldAnnotations
java.util.Set<java.lang.String> getFieldAnnotations(java.lang.String className, int scanPolicies)
Answer the names of the field annotations recorded on the specified class. Select from within the specified results.
- Parameters:
className
- The name of the class for which to select field annotations.scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of field annotations of the named class, selected from the specified results.
-
getClassesWithMethodAnnotations
java.util.Set<java.lang.String> getClassesWithMethodAnnotations(int scanPolicies)
Answer the names of the classes having any method annotations. Select Select from within the specified results.
- Parameters:
scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of the classes having the specified method annotation.
-
getClassesWithMethodAnnotation
java.util.Set<java.lang.String> getClassesWithMethodAnnotation(java.lang.String annotationName, int scanPolicies)
Answer the names of the classes having any declared occurrence of the specified method annotation. Select from within the specified results.
- Parameters:
annotationName
- The name of the method annotation on which to select.scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of the classes having the specified method annotation.
-
getMethodAnnotations
java.util.Set<java.lang.String> getMethodAnnotations(int scanPolicies)
Answer the names of the recorded method annotations. Select from within the specified results.
- Parameters:
scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of method annotations of the named class, selected from the specified results.
-
getMethodAnnotations
java.util.Set<java.lang.String> getMethodAnnotations(java.lang.String className, int scanPolicies)
Answer the names of the method annotations recorded on the specified class. Select from within the specified results.
- Parameters:
className
- The name of the class for which to select method annotations.scanPolicies
- The policies for which to select class annotations, as bitwise OR of scan policy values.- Returns:
- The names of method annotations of the named class, selected from the specified results.
-
getAllInheritedAnnotatedClasses
java.util.Set<java.lang.String> getAllInheritedAnnotatedClasses(java.lang.String annotationName)
Utility for inherited class annotations: Find classes which have the specified class annotation, or which are a subclass of a class which has the specified class annotation.
Restrict the result to annotations specified in SEED classes and inherited by SEED classes. (Inheritance information may traverse non SEED classes.)
Do NOT use this method if the specified annotation type is not an inherited class annotation, as it is inefficient for that purpose. Use
getAnnotatedClasses(String)
instead.The operation does not require that the specified annotation type be an inherited class annotation. The result, however, is meaningless if the class annotation is not actually inherited.
No similar capability is provided for method annotations. Method annotations are not inheritable. For the related handling of annotations on inherited methods, more comprehensive processing must be performed, as method overloading must be taken into account. Use java reflection or the class info store to process annotations on inherited methods.
- Parameters:
annotationName
- The class annotation for which to obtain annotations.- Returns:
- All targets of a specified class annotation, including both declared and inheriting targets
-
getAllInheritedAnnotatedClasses
java.util.Set<java.lang.String> getAllInheritedAnnotatedClasses(java.lang.String annotationName, int scanPolicies)
Utility for inherited class annotations. Similar to
getAllInheritedAnnotatedClasses(String)
, except that the results are restricted to annotations declared in the specified results and inherited by classes in the specified results.- Parameters:
annotationName
- The class annotation for which to obtain annotations.scanPolicies
- The policies for which to select classes, as bitwise OR of scan policy values. Applies to both declaring and inheriting classes considered for the results.- Returns:
- All targets of a specified class annotation, including both declared and inheriting targets, but limited by the selection policy.
-
getAllInheritedAnnotatedClasses
java.util.Set<java.lang.String> getAllInheritedAnnotatedClasses(java.lang.String annotationName, int declarerScanPolicies, int inheritorScanPolicies)
Utility for inherited class annotations. Similar to
getAllInheritedAnnotatedClasses(String)
, except that the results are restricted to annotations declared the specified results and inherited by classes in distinct specified results.- Parameters:
annotationName
- The class annotation for which to obtain annotations.declarerScanPolicies
- The policies for which to select classes, as bitwise OR of scan policy values. Used to select classes which declare an occurrence of the specified annotation.inheritorScanPolicies
- The policies for which to select classes, as bitwise OR of scan policy values. Used to select classes which inherit from the selected annotated classes.- Returns:
- All targets of a specified class annotation, including both declared and inheriting targets, but limited by selection policies.
-
-