From 1697932c57af5389fe07971e91866980e966403f Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Fri, 27 Mar 2009 04:57:13 +0000 Subject: [PATCH] consolidated context.annotation.support -> context.annotation --- .../AbstractConfigurationClassProcessor.java | 4 +-- .../{support => }/AddAnnotationAdapter.java | 2 +- .../{support => }/AnnotationAdapter.java | 2 +- .../annotation/AnnotationConfigUtils.java | 1 - .../annotation/{support => }/AsmUtils.java | 2 +- .../annotation/{support => }/BeanMethod.java | 6 +---- .../{support => }/BeanMethodInterceptor.java | 5 +--- .../{support => }/ConfigurationClass.java | 4 +-- .../ConfigurationClassMethodVisitor.java | 6 ++--- .../ConfigurationClassPostProcessor.java | 4 +-- .../ConfigurationClassVisitor.java | 6 ++--- .../{support => }/ConfigurationEnhancer.java | 6 ++--- .../{support => }/ConfigurationModel.java | 3 +-- ...onfigurationModelBeanDefinitionReader.java | 6 +---- .../{support => }/ConfigurationParser.java | 7 +++--- .../ImportAnnotationVisitor.java | 5 ++-- .../annotation/{support => }/ImportStack.java | 3 +-- .../{support => }/ImportStackHolder.java | 3 +-- .../annotation/{support => }/ModelClass.java | 2 +- .../{support => }/MutableAnnotation.java | 15 ++--------- .../MutableAnnotationArrayVisitor.java | 4 +-- .../MutableAnnotationInvocationHandler.java | 2 +- .../MutableAnnotationVisitor.java | 4 +-- .../annotation/support/package-info.java | 25 ------------------- .../AbstractCircularImportDetectionTests.java | 4 +-- .../AsmCircularImportDetectionTests.java | 4 +-- .../{support => }/BeanMethodTests.java | 7 ++++-- .../ConfigurationModelTests.java | 6 ++--- .../ConfigurationPostProcessorTests.java | 3 ++- ...alidConfigurationClassDefinitionTests.java | 4 +-- ...BeanDefinitionConfigurationClassTests.java | 2 +- .../annotation/configuration/AspectTests.java | 2 +- .../annotation/configuration/BasicTests.java | 2 +- .../annotation/configuration/ImportTests.java | 2 +- .../PolymorphicConfigurationTests.java | 2 +- .../configuration/ScopingTests.java | 2 +- .../configuration/package-info.java | 2 +- 37 files changed, 54 insertions(+), 115 deletions(-) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/AbstractConfigurationClassProcessor.java (96%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/AddAnnotationAdapter.java (98%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/AnnotationAdapter.java (97%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/AsmUtils.java (99%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/BeanMethod.java (95%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/BeanMethodInterceptor.java (94%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationClass.java (97%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationClassMethodVisitor.java (95%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationClassPostProcessor.java (97%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationClassVisitor.java (97%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationEnhancer.java (96%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationModel.java (94%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationModelBeanDefinitionReader.java (97%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ConfigurationParser.java (93%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ImportAnnotationVisitor.java (93%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ImportStack.java (95%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ImportStackHolder.java (91%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/ModelClass.java (98%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/MutableAnnotation.java (67%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/MutableAnnotationArrayVisitor.java (94%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/MutableAnnotationInvocationHandler.java (99%) rename org.springframework.context/src/main/java/org/springframework/context/annotation/{support => }/MutableAnnotationVisitor.java (96%) delete mode 100644 org.springframework.context/src/main/java/org/springframework/context/annotation/support/package-info.java rename org.springframework.context/src/test/java/org/springframework/context/annotation/{support => }/AbstractCircularImportDetectionTests.java (95%) rename org.springframework.context/src/test/java/org/springframework/context/annotation/{support => }/AsmCircularImportDetectionTests.java (92%) rename org.springframework.context/src/test/java/org/springframework/context/annotation/{support => }/BeanMethodTests.java (95%) rename org.springframework.context/src/test/java/org/springframework/context/annotation/{support => }/ConfigurationModelTests.java (86%) rename org.springframework.context/src/test/java/org/springframework/context/annotation/{support => }/ConfigurationPostProcessorTests.java (97%) rename org.springframework.context/src/test/java/org/springframework/context/annotation/{support => }/InvalidConfigurationClassDefinitionTests.java (93%) diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AbstractConfigurationClassProcessor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/AbstractConfigurationClassProcessor.java similarity index 96% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/AbstractConfigurationClassProcessor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/AbstractConfigurationClassProcessor.java index aa19cc1338..f57950abea 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AbstractConfigurationClassProcessor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/AbstractConfigurationClassProcessor.java @@ -14,14 +14,12 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.parsing.FailFastProblemReporter; import org.springframework.beans.factory.parsing.ProblemReporter; import org.springframework.beans.factory.support.BeanDefinitionRegistry; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; /** diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AddAnnotationAdapter.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/AddAnnotationAdapter.java similarity index 98% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/AddAnnotationAdapter.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/AddAnnotationAdapter.java index 514e2b9e67..e3acb2f886 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AddAnnotationAdapter.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/AddAnnotationAdapter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import net.sf.cglib.asm.Constants; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AnnotationAdapter.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationAdapter.java similarity index 97% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/AnnotationAdapter.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationAdapter.java index 9fdbb32662..27522b580d 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AnnotationAdapter.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationAdapter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import org.springframework.asm.AnnotationVisitor; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java index e659393942..73795dddb3 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java @@ -25,7 +25,6 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; import org.springframework.util.ClassUtils; /** diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AsmUtils.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/AsmUtils.java similarity index 99% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/AsmUtils.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/AsmUtils.java index 62a3e992bd..4abe3c4983 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/AsmUtils.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/AsmUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; import static org.springframework.util.ClassUtils.*; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/BeanMethod.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/BeanMethod.java similarity index 95% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/BeanMethod.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/BeanMethod.java index 55b7cd5c1b..9e2df80343 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/BeanMethod.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/BeanMethod.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; import static org.springframework.context.annotation.StandardScopes.*; @@ -27,10 +27,6 @@ import org.springframework.beans.BeanMetadataElement; import org.springframework.beans.factory.parsing.Location; import org.springframework.beans.factory.parsing.Problem; import org.springframework.beans.factory.parsing.ProblemReporter; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Scope; -import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.util.Assert; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/BeanMethodInterceptor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/BeanMethodInterceptor.java similarity index 94% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/BeanMethodInterceptor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/BeanMethodInterceptor.java index e9604b4692..d7d9d2ddb7 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/BeanMethodInterceptor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/BeanMethodInterceptor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; @@ -27,9 +27,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Scope; -import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.core.annotation.AnnotationUtils; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClass.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java similarity index 97% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClass.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java index f88c4ef8bc..507e67fdd3 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClass.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; @@ -24,8 +24,6 @@ import java.util.Set; import org.springframework.beans.factory.parsing.Problem; import org.springframework.beans.factory.parsing.ProblemReporter; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.util.Assert; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassMethodVisitor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassMethodVisitor.java similarity index 95% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassMethodVisitor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassMethodVisitor.java index f7d9081f95..918c4b8850 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassMethodVisitor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassMethodVisitor.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; -import static org.springframework.context.annotation.support.AsmUtils.*; +import static org.springframework.context.annotation.AsmUtils.*; import static org.springframework.util.ClassUtils.*; import java.lang.annotation.Annotation; @@ -28,8 +28,6 @@ import org.springframework.asm.Label; import org.springframework.asm.MethodAdapter; import org.springframework.asm.MethodVisitor; import org.springframework.asm.Opcodes; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; /** diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassPostProcessor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java similarity index 97% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassPostProcessor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java index 29c8e8bbb4..43e3eb8d42 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassPostProcessor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; @@ -28,8 +28,6 @@ import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; import org.springframework.core.type.AnnotationMetadata; import org.springframework.core.type.ClassMetadata; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassVisitor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassVisitor.java similarity index 97% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassVisitor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassVisitor.java index 34f791aaef..1a6338fb81 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationClassVisitor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassVisitor.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; -import static org.springframework.context.annotation.support.AsmUtils.*; +import static org.springframework.context.annotation.AsmUtils.*; import static org.springframework.util.ClassUtils.*; import java.util.HashMap; @@ -32,8 +32,6 @@ import org.springframework.asm.Opcodes; import org.springframework.beans.factory.parsing.Location; import org.springframework.beans.factory.parsing.Problem; import org.springframework.beans.factory.parsing.ProblemReporter; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; import org.springframework.core.io.ClassPathResource; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationEnhancer.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationEnhancer.java similarity index 96% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationEnhancer.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationEnhancer.java index d6179af61c..88b180921f 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationEnhancer.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationEnhancer.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; -import static org.springframework.context.annotation.support.AsmUtils.*; +import static org.springframework.context.annotation.AsmUtils.*; import java.lang.annotation.Annotation; import java.lang.reflect.Method; @@ -35,8 +35,6 @@ import org.springframework.asm.ClassAdapter; import org.springframework.asm.ClassReader; import org.springframework.asm.ClassWriter; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.util.Assert; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationModel.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationModel.java similarity index 94% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationModel.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationModel.java index 91d6093995..bad0d61f8c 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationModel.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; @@ -22,7 +22,6 @@ import java.util.LinkedHashSet; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.parsing.ProblemReporter; -import org.springframework.context.annotation.Configuration; /** diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationModelBeanDefinitionReader.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationModelBeanDefinitionReader.java similarity index 97% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationModelBeanDefinitionReader.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationModelBeanDefinitionReader.java index 1d17bcbeff..3590ffe124 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationModelBeanDefinitionReader.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationModelBeanDefinitionReader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; import static org.springframework.util.StringUtils.*; @@ -36,10 +36,6 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.support.SimpleBeanDefinitionRegistry; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Scope; -import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.core.io.Resource; import org.springframework.util.Assert; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationParser.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationParser.java similarity index 93% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationParser.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationParser.java index 533f6cbba8..6247a4682b 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ConfigurationParser.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationParser.java @@ -14,14 +14,13 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; -import static org.springframework.context.annotation.support.AsmUtils.*; +import static org.springframework.context.annotation.AsmUtils.*; import org.springframework.asm.ClassReader; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.parsing.ProblemReporter; -import org.springframework.context.annotation.Configuration; import org.springframework.util.ClassUtils; @@ -39,7 +38,7 @@ import org.springframework.util.ClassUtils; * @see ConfigurationModel * @see ConfigurationModelBeanDefinitionReader */ -public class ConfigurationParser { +class ConfigurationParser { /** * Model to be populated during calls to {@link #parse(Object, String)} diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportAnnotationVisitor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ImportAnnotationVisitor.java similarity index 93% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportAnnotationVisitor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ImportAnnotationVisitor.java index d6527b2fd9..b2d06a69ba 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportAnnotationVisitor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ImportAnnotationVisitor.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; -import static org.springframework.context.annotation.support.AsmUtils.*; +import static org.springframework.context.annotation.AsmUtils.*; import static org.springframework.util.ClassUtils.*; import java.util.ArrayList; @@ -26,7 +26,6 @@ import org.springframework.asm.AnnotationVisitor; import org.springframework.asm.ClassReader; import org.springframework.asm.Type; import org.springframework.beans.factory.parsing.ProblemReporter; -import org.springframework.context.annotation.Import; import org.springframework.util.Assert; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportStack.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ImportStack.java similarity index 95% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportStack.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ImportStack.java index 75a0e7a396..82b5230ae4 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportStack.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ImportStack.java @@ -14,14 +14,13 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.Stack; -import org.springframework.context.annotation.Import; import org.springframework.util.Assert; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportStackHolder.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ImportStackHolder.java similarity index 91% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportStackHolder.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ImportStackHolder.java index 54a9fe7304..33def11849 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ImportStackHolder.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ImportStackHolder.java @@ -14,9 +14,8 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; -import org.springframework.context.annotation.Import; /** diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ModelClass.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ModelClass.java similarity index 98% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/ModelClass.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/ModelClass.java index 3e4bac46da..2219c1ba16 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/ModelClass.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ModelClass.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static org.springframework.util.ClassUtils.*; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotation.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotation.java similarity index 67% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotation.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotation.java index 7796031257..698f701d33 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotation.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotation.java @@ -14,9 +14,8 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; -import org.springframework.context.annotation.Configuration; /** * Interface used when dynamically creating mutable instances of annotations associated @@ -29,22 +28,12 @@ import org.springframework.context.annotation.Configuration; * model representations of all annotations and attributes. It is better to simply attach * annotation instances and read them as needed. * - *

Note: the visibility of this interface would be reduced to package-private save for an - * obscure restriction of JDK dynamic proxies. - * {@link AsmUtils#createMutableAnnotation} creates a proxy based on - * two interfaces: this one, and whatever annotation is currently being parsed. The - * restriction is that both interfaces may not be package-private if they are in separate - * packages. In order to avoid unnecessarily restricting the visibility options for - * user-defined annotations, this interface becomes public. Developers should take caution - * not to use this annotation outside this package. - * * @author Chris Beams - * @since 3.0 * @see MutableAnnotationVisitor * @see MutableAnnotationInvocationHandler * @see AsmUtils#createMutableAnnotation */ -public interface MutableAnnotation { +interface MutableAnnotation { void setAttributeValue(String attribName, Object attribValue); diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationArrayVisitor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationArrayVisitor.java similarity index 94% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationArrayVisitor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationArrayVisitor.java index a693f36fe7..610988fba0 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationArrayVisitor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationArrayVisitor.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; -import static org.springframework.context.annotation.support.AsmUtils.*; +import static org.springframework.context.annotation.AsmUtils.*; import java.lang.annotation.Annotation; import java.lang.reflect.Array; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationInvocationHandler.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationInvocationHandler.java similarity index 99% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationInvocationHandler.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationInvocationHandler.java index bd78d875b5..da869b24f4 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationInvocationHandler.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationInvocationHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; import static org.springframework.core.annotation.AnnotationUtils.*; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationVisitor.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationVisitor.java similarity index 96% rename from org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationVisitor.java rename to org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationVisitor.java index a8f1d41c96..6f2160af58 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/MutableAnnotationVisitor.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/MutableAnnotationVisitor.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; -import static org.springframework.context.annotation.support.AsmUtils.*; +import static org.springframework.context.annotation.AsmUtils.*; import java.lang.annotation.Annotation; import java.lang.reflect.Field; diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/package-info.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/support/package-info.java deleted file mode 100644 index 536870c62d..0000000000 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/support/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2002-2009 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Supporting infrastructure for - * {@link org.springframework.context.annotation.Configuration} class processing. - * - * @author Chris Beams - * @see ConfigurationClassPostProcessor - * @see ConfigurationParser - */ -package org.springframework.context.annotation.support; \ No newline at end of file diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/AbstractCircularImportDetectionTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java similarity index 95% rename from org.springframework.context/src/test/java/org/springframework/context/annotation/support/AbstractCircularImportDetectionTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java index 1d8f4cdaa8..c8987947de 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/AbstractCircularImportDetectionTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static org.junit.Assert.*; import org.junit.Test; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ConfigurationParser; import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.support.ConfigurationParser; import test.beans.TestBean; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/AsmCircularImportDetectionTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java similarity index 92% rename from org.springframework.context/src/test/java/org/springframework/context/annotation/support/AsmCircularImportDetectionTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java index f18097cc57..699bd1c095 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/AsmCircularImportDetectionTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import org.springframework.beans.factory.parsing.FailFastProblemReporter; +import org.springframework.context.annotation.ConfigurationParser; import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.support.ConfigurationParser; import org.springframework.util.ClassUtils; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/BeanMethodTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/BeanMethodTests.java similarity index 95% rename from org.springframework.context/src/test/java/org/springframework/context/annotation/support/BeanMethodTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/BeanMethodTests.java index c7e26aba51..1894b15104 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/BeanMethodTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/BeanMethodTests.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; +import static org.springframework.context.annotation.AsmUtils.*; import static org.springframework.context.annotation.ScopedProxyMode.*; import static org.springframework.context.annotation.StandardScopes.*; -import static org.springframework.context.annotation.support.AsmUtils.*; import java.lang.reflect.Modifier; @@ -29,6 +29,9 @@ import org.springframework.beans.factory.parsing.FailFastProblemReporter; import org.springframework.beans.factory.parsing.Location; import org.springframework.beans.factory.parsing.ProblemReporter; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.BeanMethod; +import org.springframework.context.annotation.ConfigurationClass; +import org.springframework.context.annotation.ModelClass; import org.springframework.context.annotation.Scope; import org.springframework.core.io.ClassPathResource; import org.springframework.util.ClassUtils; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/ConfigurationModelTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/ConfigurationModelTests.java similarity index 86% rename from org.springframework.context/src/test/java/org/springframework/context/annotation/support/ConfigurationModelTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/ConfigurationModelTests.java index c0b753f90f..8b2867b48a 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/ConfigurationModelTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/ConfigurationModelTests.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static java.lang.String.*; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.context.annotation.support.ConfigurationClass; -import org.springframework.context.annotation.support.ConfigurationModel; +import org.springframework.context.annotation.ConfigurationClass; +import org.springframework.context.annotation.ConfigurationModel; /** diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/ConfigurationPostProcessorTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/ConfigurationPostProcessorTests.java similarity index 97% rename from org.springframework.context/src/test/java/org/springframework/context/annotation/support/ConfigurationPostProcessorTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/ConfigurationPostProcessorTests.java index 59628a3087..99d6086cca 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/ConfigurationPostProcessorTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/ConfigurationPostProcessorTests.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; @@ -27,6 +27,7 @@ import org.junit.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; import org.springframework.util.ClassUtils; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/InvalidConfigurationClassDefinitionTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java similarity index 93% rename from org.springframework.context/src/test/java/org/springframework/context/annotation/support/InvalidConfigurationClassDefinitionTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java index ae30c5b9c7..4a42783bc7 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/support/InvalidConfigurationClassDefinitionTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.context.annotation.support; +package org.springframework.context.annotation; import static org.junit.Assert.*; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; @@ -23,7 +23,7 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; /** diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AbstractBeanDefinitionConfigurationClassTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AbstractBeanDefinitionConfigurationClassTests.java index 3012659a77..148f6f0819 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AbstractBeanDefinitionConfigurationClassTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AbstractBeanDefinitionConfigurationClassTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; /** diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AspectTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AspectTests.java index b7f8d69c80..80f3013049 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AspectTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/AspectTests.java @@ -10,7 +10,7 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.XmlBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/BasicTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/BasicTests.java index d8a0e1b6ed..9cfe880ada 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/BasicTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/BasicTests.java @@ -13,9 +13,9 @@ import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.StandardScopes; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; import test.beans.ITestBean; import test.beans.TestBean; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java index 5535d0c0cd..1076a026f7 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java @@ -24,8 +24,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; import test.beans.ITestBean; import test.beans.TestBean; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/PolymorphicConfigurationTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/PolymorphicConfigurationTests.java index 32f24ad04f..0624f28547 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/PolymorphicConfigurationTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/PolymorphicConfigurationTests.java @@ -22,7 +22,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; import test.beans.TestBean; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java index 5ce1f75d31..28c5cc0b4a 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java @@ -31,10 +31,10 @@ import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ConfigurationClassPostProcessor; import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.context.annotation.StandardScopes; -import org.springframework.context.annotation.support.ConfigurationClassPostProcessor; import org.springframework.context.support.GenericApplicationContext; import test.beans.ITestBean; diff --git a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/package-info.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/package-info.java index f3af9e9540..505ef3f8b6 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/package-info.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/configuration/package-info.java @@ -21,6 +21,6 @@ * @author Chris Beams * @see org.springframework.context.annotation.Configuration * @see org.springframework.context.annotation.Bean - * @see org.springframework.context.annotation.support.ConfigurationClassPostProcessor + * @see org.springframework.context.annotation.ConfigurationClassPostProcessor */ package org.springframework.context.annotation.configuration; \ No newline at end of file -- GitLab