Polishing
This commit is contained in:
parent
83acd5b050
commit
564f33d5ef
|
@ -90,7 +90,7 @@ public class InitDestroyAnnotationBeanPostProcessor implements DestructionAwareB
|
||||||
private final transient LifecycleMetadata emptyLifecycleMetadata =
|
private final transient LifecycleMetadata emptyLifecycleMetadata =
|
||||||
new LifecycleMetadata(Object.class, Collections.emptyList(), Collections.emptyList()) {
|
new LifecycleMetadata(Object.class, Collections.emptyList(), Collections.emptyList()) {
|
||||||
@Override
|
@Override
|
||||||
public void checkConfigMembers(RootBeanDefinition beanDefinition) {
|
public void checkInitDestroyMethods(RootBeanDefinition beanDefinition) {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void invokeInitMethods(Object target, String beanName) {
|
public void invokeInitMethods(Object target, String beanName) {
|
||||||
|
@ -175,7 +175,7 @@ public class InitDestroyAnnotationBeanPostProcessor implements DestructionAwareB
|
||||||
|
|
||||||
private LifecycleMetadata findInjectionMetadata(RootBeanDefinition beanDefinition, Class<?> beanType) {
|
private LifecycleMetadata findInjectionMetadata(RootBeanDefinition beanDefinition, Class<?> beanType) {
|
||||||
LifecycleMetadata metadata = findLifecycleMetadata(beanType);
|
LifecycleMetadata metadata = findLifecycleMetadata(beanType);
|
||||||
metadata.checkConfigMembers(beanDefinition);
|
metadata.checkInitDestroyMethods(beanDefinition);
|
||||||
return metadata;
|
return metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ public class InitDestroyAnnotationBeanPostProcessor implements DestructionAwareB
|
||||||
this.destroyMethods = destroyMethods;
|
this.destroyMethods = destroyMethods;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkConfigMembers(RootBeanDefinition beanDefinition) {
|
public void checkInitDestroyMethods(RootBeanDefinition beanDefinition) {
|
||||||
Set<LifecycleElement> checkedInitMethods = new LinkedHashSet<>(this.initMethods.size());
|
Set<LifecycleElement> checkedInitMethods = new LinkedHashSet<>(this.initMethods.size());
|
||||||
for (LifecycleElement element : this.initMethods) {
|
for (LifecycleElement element : this.initMethods) {
|
||||||
String methodIdentifier = element.getIdentifier();
|
String methodIdentifier = element.getIdentifier();
|
||||||
|
|
|
@ -56,21 +56,19 @@ import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal code generator to set {@link RootBeanDefinition} properties.
|
* Internal code generator to set {@link RootBeanDefinition} properties.
|
||||||
* <p>
|
*
|
||||||
* Generates code in the following form:<blockquote><pre class="code">
|
* <p>Generates code in the following form:<pre class="code">
|
||||||
* beanDefinition.setPrimary(true);
|
* beanDefinition.setPrimary(true);
|
||||||
* beanDefinition.setScope(BeanDefinition.SCOPE_PROTOTYPE);
|
* beanDefinition.setScope(BeanDefinition.SCOPE_PROTOTYPE);
|
||||||
* ...
|
* ...
|
||||||
* </pre></blockquote>
|
* </pre>
|
||||||
* <p>
|
*
|
||||||
* The generated code expects the following variables to be available:
|
* <p>The generated code expects the following variables to be available:
|
||||||
* <p>
|
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@code beanDefinition} - The {@link RootBeanDefinition} to
|
* <li>{@code beanDefinition}: the {@link RootBeanDefinition} to configure</li>
|
||||||
* configure.</li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
*
|
||||||
* Note that this generator does <b>not</b> set the {@link InstanceSupplier}.
|
* <p>Note that this generator does <b>not</b> set the {@link InstanceSupplier}.
|
||||||
*
|
*
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
|
Loading…
Reference in New Issue