|
|
|
|
@ -70,14 +70,14 @@ public abstract class AdviceModeImportSelector<A extends Annotation> implements
@@ -70,14 +70,14 @@ public abstract class AdviceModeImportSelector<A extends Annotation> implements
|
|
|
|
|
AnnotationAttributes attributes = AnnotationConfigUtils.attributesFor(importingClassMetadata, annType); |
|
|
|
|
if (attributes == null) { |
|
|
|
|
throw new IllegalArgumentException(String.format( |
|
|
|
|
"@%s is not present on importing class '%s' as expected", |
|
|
|
|
annType.getSimpleName(), importingClassMetadata.getClassName())); |
|
|
|
|
"@%s is not present on importing class '%s' as expected", |
|
|
|
|
annType.getSimpleName(), importingClassMetadata.getClassName())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AdviceMode adviceMode = attributes.getEnum(this.getAdviceModeAttributeName()); |
|
|
|
|
AdviceMode adviceMode = attributes.getEnum(getAdviceModeAttributeName()); |
|
|
|
|
String[] imports = selectImports(adviceMode); |
|
|
|
|
if (imports == null) { |
|
|
|
|
throw new IllegalArgumentException(String.format("Unknown AdviceMode: '%s'", adviceMode)); |
|
|
|
|
throw new IllegalArgumentException("Unknown AdviceMode: " + adviceMode); |
|
|
|
|
} |
|
|
|
|
return imports; |
|
|
|
|
} |
|
|
|
|
|