Browse Source

Polish

pull/28922/head
Stephane Nicoll 3 years ago
parent
commit
dcad3beeb9
  1. 5
      spring-beans/src/test/java/org/springframework/beans/factory/aot/DefaultBeanRegistrationCodeFragmentsTests.java
  2. 2
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/DeferredTypeBuilder.java
  3. 2
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/GenericFactoryBean.java
  4. 9
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/MockBeanFactoryInitializationCode.java
  5. 6
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/MockBeanRegistrationCode.java
  6. 6
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/MockBeanRegistrationsCode.java
  7. 2
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/NumberFactoryBean.java
  8. 2
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/SimpleBean.java
  9. 2
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/SimpleBeanConfiguration.java
  10. 2
      spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/SimpleBeanFactoryBean.java

5
spring-beans/src/test/java/org/springframework/beans/factory/aot/DefaultBeanRegistrationCodeFragmentsTests.java

@ -26,7 +26,12 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RegisteredBean; import org.springframework.beans.factory.support.RegisteredBean;
import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.testfixture.beans.factory.DummyFactory; import org.springframework.beans.testfixture.beans.factory.DummyFactory;
import org.springframework.beans.testfixture.beans.factory.aot.GenericFactoryBean;
import org.springframework.beans.testfixture.beans.factory.aot.MockBeanRegistrationsCode; import org.springframework.beans.testfixture.beans.factory.aot.MockBeanRegistrationsCode;
import org.springframework.beans.testfixture.beans.factory.aot.NumberFactoryBean;
import org.springframework.beans.testfixture.beans.factory.aot.SimpleBean;
import org.springframework.beans.testfixture.beans.factory.aot.SimpleBeanConfiguration;
import org.springframework.beans.testfixture.beans.factory.aot.SimpleBeanFactoryBean;
import org.springframework.core.ResolvableType; import org.springframework.core.ResolvableType;
import org.springframework.core.testfixture.aot.generate.TestGenerationContext; import org.springframework.core.testfixture.aot.generate.TestGenerationContext;
import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils;

2
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/DeferredTypeBuilder.java

@ -19,6 +19,7 @@ package org.springframework.beans.testfixture.beans.factory.aot;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.springframework.javapoet.TypeSpec; import org.springframework.javapoet.TypeSpec;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -30,6 +31,7 @@ import org.springframework.util.Assert;
*/ */
public class DeferredTypeBuilder implements Consumer<TypeSpec.Builder> { public class DeferredTypeBuilder implements Consumer<TypeSpec.Builder> {
@Nullable
private Consumer<TypeSpec.Builder> type; private Consumer<TypeSpec.Builder> type;
@Override @Override

2
spring-beans/src/testFixtures/java/org/springframework/beans/factory/aot/GenericFactoryBean.java → spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/GenericFactoryBean.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.beans.factory.aot; package org.springframework.beans.testfixture.beans.factory.aot;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.FactoryBean;

9
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/MockBeanFactoryInitializationCode.java

@ -42,16 +42,13 @@ public class MockBeanFactoryInitializationCode implements BeanFactoryInitializat
public MockBeanFactoryInitializationCode(GenerationContext generationContext) { public MockBeanFactoryInitializationCode(GenerationContext generationContext) {
this.generatedClass = generationContext.getGeneratedClasses().addForFeature("TestCode", typeBuilder); this.generatedClass = generationContext.getGeneratedClasses()
.addForFeature("TestCode", this.typeBuilder);
} }
public DeferredTypeBuilder getTypeBuilder() { public DeferredTypeBuilder getTypeBuilder() {
return typeBuilder; return this.typeBuilder;
}
public GeneratedClass getGeneratedClass() {
return generatedClass;
} }
@Override @Override

6
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/MockBeanRegistrationCode.java

@ -48,11 +48,7 @@ public class MockBeanRegistrationCode implements BeanRegistrationCode {
public DeferredTypeBuilder getTypeBuilder() { public DeferredTypeBuilder getTypeBuilder() {
return typeBuilder; return this.typeBuilder;
}
public GeneratedClass getGeneratedClass() {
return this.generatedClass;
} }
@Override @Override

6
spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/MockBeanRegistrationsCode.java

@ -41,11 +41,7 @@ public class MockBeanRegistrationsCode implements BeanRegistrationsCode {
public DeferredTypeBuilder getTypeBuilder() { public DeferredTypeBuilder getTypeBuilder() {
return typeBuilder; return this.typeBuilder;
}
public GeneratedClass getGeneratedClass() {
return this.generatedClass;
} }
@Override @Override

2
spring-beans/src/testFixtures/java/org/springframework/beans/factory/aot/NumberFactoryBean.java → spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/NumberFactoryBean.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.beans.factory.aot; package org.springframework.beans.testfixture.beans.factory.aot;
/** /**
* A {@link GenericFactoryBean} that has a bound for the target type. * A {@link GenericFactoryBean} that has a bound for the target type.

2
spring-beans/src/testFixtures/java/org/springframework/beans/factory/aot/SimpleBean.java → spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/SimpleBean.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.beans.factory.aot; package org.springframework.beans.testfixture.beans.factory.aot;
/** /**
* An empty test bean used by code generation. * An empty test bean used by code generation.

2
spring-beans/src/testFixtures/java/org/springframework/beans/factory/aot/SimpleBeanConfiguration.java → spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/SimpleBeanConfiguration.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.beans.factory.aot; package org.springframework.beans.testfixture.beans.factory.aot;
/** /**
* *

2
spring-beans/src/testFixtures/java/org/springframework/beans/factory/aot/SimpleBeanFactoryBean.java → spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/aot/SimpleBeanFactoryBean.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.beans.factory.aot; package org.springframework.beans.testfixture.beans.factory.aot;
import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.FactoryBean;
Loading…
Cancel
Save