Browse Source

+ Moved @Bean into base package, next to @Configuration

+ Removed .ext package
+ Further reduced visibility of types wherever possible
+ Eliminated package cycles


git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@733 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Chris Beams 17 years ago
parent
commit
ba21e9bdb6
  1. 4
      org.springframework.config.java/src/main/java/org/springframework/config/java/Bean.java
  2. 1
      org.springframework.config.java/src/main/java/org/springframework/config/java/BeanMethod.java
  3. 8
      org.springframework.config.java/src/main/java/org/springframework/config/java/BeanRegistrar.java
  4. 1
      org.springframework.config.java/src/main/java/org/springframework/config/java/Configuration.java
  5. 1
      org.springframework.config.java/src/main/java/org/springframework/config/java/ConfigurationClass.java
  6. 1
      org.springframework.config.java/src/main/java/org/springframework/config/java/ConfigurationModel.java
  7. 2
      org.springframework.config.java/src/main/java/org/springframework/config/java/Validatable.java
  8. 5
      org.springframework.config.java/src/main/java/org/springframework/config/java/Validator.java
  9. 6
      org.springframework.config.java/src/main/java/org/springframework/config/java/internal/enhancement/BeanMethodInterceptor.java
  10. 2
      org.springframework.config.java/src/main/java/org/springframework/config/java/internal/enhancement/ConfigurationEnhancer.java
  11. 2
      org.springframework.config.java/src/main/java/org/springframework/config/java/internal/parsing/ConfigurationClassMethodVisitor.java
  12. 2
      org.springframework.config.java/src/main/java/org/springframework/config/java/support/AbstractConfigurationClassProcessor.java
  13. 2
      org.springframework.config.java/src/main/java/org/springframework/config/java/support/ConfigurationClassPostProcessor.java
  14. 4
      org.springframework.config.java/src/main/java/org/springframework/config/java/support/ConfigurationModelBeanDefinitionReader.java
  15. 2
      org.springframework.config.java/src/test/java/org/springframework/config/java/support/ConfigurationPostProcessorTests.java
  16. 2
      org.springframework.config.java/src/test/java/test/basic/AutowiredConfigurationTests.java
  17. 2
      org.springframework.config.java/src/test/java/test/basic/BasicTests.java

4
org.springframework.config.java/src/main/java/org/springframework/config/java/ext/Bean.java → org.springframework.config.java/src/main/java/org/springframework/config/java/Bean.java

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.config.java.ext;
package org.springframework.config.java;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
@ -25,8 +25,6 @@ import java.lang.annotation.Target; @@ -25,8 +25,6 @@ import java.lang.annotation.Target;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.StandardScopes;
/**

1
org.springframework.config.java/src/main/java/org/springframework/config/java/BeanMethod.java

@ -22,7 +22,6 @@ import java.lang.reflect.Modifier; @@ -22,7 +22,6 @@ import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
import org.springframework.config.java.ext.Bean;
import org.springframework.util.Assert;

8
org.springframework.config.java/src/main/java/org/springframework/config/java/ext/BeanRegistrar.java → org.springframework.config.java/src/main/java/org/springframework/config/java/BeanRegistrar.java

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
package org.springframework.config.java.ext;
package org.springframework.config.java;
import static java.lang.String.*;
import static org.springframework.util.StringUtils.*;
@ -13,12 +13,6 @@ import org.springframework.beans.factory.config.BeanDefinition; @@ -13,12 +13,6 @@ import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.config.java.BeanDefinitionRegistrar;
import org.springframework.config.java.BeanMethod;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ConfigurationClass;
import org.springframework.config.java.MalformedConfigurationException;
import org.springframework.config.java.UsageError;
import org.springframework.core.annotation.AnnotationUtils;

1
org.springframework.config.java/src/main/java/org/springframework/config/java/Configuration.java

@ -24,7 +24,6 @@ import java.lang.annotation.Target; @@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.config.java.ext.Bean;
import org.springframework.stereotype.Component;

1
org.springframework.config.java/src/main/java/org/springframework/config/java/ConfigurationClass.java

@ -24,7 +24,6 @@ import java.util.HashSet; @@ -24,7 +24,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.springframework.config.java.ext.Bean;
import org.springframework.util.Assert;
import sun.security.x509.Extension;

1
org.springframework.config.java/src/main/java/org/springframework/config/java/ConfigurationModel.java

@ -20,7 +20,6 @@ import static java.lang.String.*; @@ -20,7 +20,6 @@ import static java.lang.String.*;
import java.util.ArrayList;
import java.util.List;
import org.springframework.config.java.ext.Bean;
/**

2
org.springframework.config.java/src/main/java/org/springframework/config/java/Validatable.java

@ -10,7 +10,7 @@ import java.util.List; @@ -10,7 +10,7 @@ import java.util.List;
*
* @author Chris Beams
*/
public interface Validatable {
interface Validatable {
/**
* Validates this object, adding any errors to the supplied list of <var>errors</var>.

5
org.springframework.config.java/src/main/java/org/springframework/config/java/Validator.java

@ -3,10 +3,7 @@ package org.springframework.config.java; @@ -3,10 +3,7 @@ package org.springframework.config.java;
import java.util.List;
/** Marker interface */
// TODO: SJC-242 document
// TODO: SJC-242 rename
public interface Validator {
interface Validator {
boolean supports(Object object);
void validate(Object object, List<UsageError> errors);

6
org.springframework.config.java/src/main/java/org/springframework/config/java/internal/enhancement/BeanMethodInterceptor.java

@ -22,8 +22,8 @@ import java.lang.reflect.Method; @@ -22,8 +22,8 @@ import java.lang.reflect.Method;
import net.sf.cglib.proxy.MethodProxy;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.config.java.ext.Bean;
import org.springframework.config.java.ext.BeanRegistrar;
import org.springframework.config.java.Bean;
import org.springframework.config.java.BeanRegistrar;
/**
@ -35,7 +35,7 @@ import org.springframework.config.java.ext.BeanRegistrar; @@ -35,7 +35,7 @@ import org.springframework.config.java.ext.BeanRegistrar;
*
* @author Chris Beams
*/
public class BeanMethodInterceptor extends AbstractMethodInterceptor {
class BeanMethodInterceptor extends AbstractMethodInterceptor {
/**
* Enhances a {@link Bean @Bean} method to check the supplied BeanFactory for the

2
org.springframework.config.java/src/main/java/org/springframework/config/java/internal/enhancement/ConfigurationEnhancer.java

@ -41,8 +41,8 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; @@ -41,8 +41,8 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.config.java.BeanDefinitionRegistrar;
import org.springframework.config.java.BeanMethod;
import org.springframework.config.java.BeanRegistrar;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ext.BeanRegistrar;
/**

2
org.springframework.config.java/src/main/java/org/springframework/config/java/internal/parsing/ConfigurationClassMethodVisitor.java

@ -28,11 +28,11 @@ import org.objectweb.asm.ClassAdapter; @@ -28,11 +28,11 @@ import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodAdapter;
import org.objectweb.asm.Opcodes;
import org.springframework.config.java.Bean;
import org.springframework.config.java.BeanMethod;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ConfigurationClass;
import org.springframework.config.java.ModelClass;
import org.springframework.config.java.ext.Bean;
/**

2
org.springframework.config.java/src/main/java/org/springframework/config/java/support/AbstractConfigurationClassProcessor.java

@ -17,10 +17,10 @@ package org.springframework.config.java.support; @@ -17,10 +17,10 @@ package org.springframework.config.java.support;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.config.java.Bean;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ConfigurationModel;
import org.springframework.config.java.MalformedConfigurationException;
import org.springframework.config.java.ext.Bean;
import org.springframework.config.java.internal.parsing.ConfigurationParser;

2
org.springframework.config.java/src/main/java/org/springframework/config/java/support/ConfigurationClassPostProcessor.java

@ -28,11 +28,11 @@ import org.springframework.beans.factory.config.BeanFactoryPostProcessor; @@ -28,11 +28,11 @@ 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.config.java.Bean;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ConfigurationModel;
import org.springframework.config.java.MalformedConfigurationException;
import org.springframework.config.java.UsageError;
import org.springframework.config.java.ext.Bean;
import org.springframework.config.java.internal.enhancement.ConfigurationEnhancer;
import org.springframework.config.java.internal.parsing.ConfigurationParser;
import org.springframework.core.Ordered;

4
org.springframework.config.java/src/main/java/org/springframework/config/java/support/ConfigurationModelBeanDefinitionReader.java

@ -26,12 +26,12 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; @@ -26,12 +26,12 @@ 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.config.java.Bean;
import org.springframework.config.java.BeanMethod;
import org.springframework.config.java.BeanRegistrar;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ConfigurationClass;
import org.springframework.config.java.ConfigurationModel;
import org.springframework.config.java.ext.Bean;
import org.springframework.config.java.ext.BeanRegistrar;
import org.springframework.config.java.plugin.Extension;
import org.springframework.core.io.Resource;

2
org.springframework.config.java/src/test/java/org/springframework/config/java/support/ConfigurationPostProcessorTests.java

@ -24,8 +24,8 @@ import java.util.Vector; @@ -24,8 +24,8 @@ import java.util.Vector;
import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.config.java.Bean;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ext.Bean;
import org.springframework.util.ClassUtils;

2
org.springframework.config.java/src/test/java/test/basic/AutowiredConfigurationTests.java

@ -6,8 +6,8 @@ import static org.junit.Assert.*; @@ -6,8 +6,8 @@ import static org.junit.Assert.*;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.config.java.Bean;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.ext.Bean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import test.beans.Colour;

2
org.springframework.config.java/src/test/java/test/basic/BasicTests.java

@ -9,10 +9,10 @@ import org.springframework.beans.factory.BeanFactory; @@ -9,10 +9,10 @@ import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.config.java.Bean;
import org.springframework.config.java.Configuration;
import org.springframework.config.java.MalformedConfigurationException;
import org.springframework.config.java.StandardScopes;
import org.springframework.config.java.ext.Bean;
import org.springframework.config.java.support.ConfigurationClassPostProcessor;
import test.beans.ITestBean;

Loading…
Cancel
Save