Refactor AnnotationUtils#findAllAnnotationAttributes

Remove all convenience variants of #findAllAnnotationAttributes and
refactor the remaining method to accept a MetadataReaderFactory
instead of creating its own SimpleMetadataReaderFactory internally.
This allows clients to use non-default class loaders as well as
customize the particular MetadataReaderFactory to be used (e.g.
'simple' vs 'caching', etc).

Issue: SPR-8752
This commit is contained in:
Chris Beams
2011-10-09 20:32:21 +00:00
parent 3bb01ee68b
commit 6837111bda
3 changed files with 16 additions and 25 deletions

View File

@@ -210,7 +210,7 @@ class ConfigurationClassParser {
// process any @Import annotations
List<Map<String, Object>> allImportAttribs =
AnnotationUtils.findAllAnnotationAttributes(Import.class, metadata.getClassName(), true);
AnnotationUtils.findAllAnnotationAttributes(Import.class, metadata.getClassName(), true, metadataReaderFactory);
for (Map<String, Object> importAttribs : allImportAttribs) {
processImport(configClass, (String[]) importAttribs.get("value"), true);
}