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