1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
25
25
* @author Mark Fisher
26
26
* @author Juergen Hoeller
27
27
* @since 2.5
28
+ * @see AbstractBeanDefinition#applyDefaults
28
29
*/
29
30
public class BeanDefinitionDefaults {
30
31
@@ -45,6 +46,7 @@ public class BeanDefinitionDefaults {
45
46
* Set whether beans should be lazily initialized by default.
46
47
* <p>If {@code false}, the bean will get instantiated on startup by bean
47
48
* factories that perform eager initialization of singletons.
49
+ * @see AbstractBeanDefinition#setLazyInit
48
50
*/
49
51
public void setLazyInit (boolean lazyInit ) {
50
52
this .lazyInit = lazyInit ;
@@ -66,6 +68,7 @@ public boolean isLazyInit() {
66
68
* (however, there may still be explicit annotation-driven autowiring).
67
69
* @param autowireMode the autowire mode to set.
68
70
* Must be one of the constants defined in {@link AbstractBeanDefinition}.
71
+ * @see AbstractBeanDefinition#setAutowireMode
69
72
*/
70
73
public void setAutowireMode (int autowireMode ) {
71
74
this .autowireMode = autowireMode ;
@@ -82,6 +85,7 @@ public int getAutowireMode() {
82
85
* Set the dependency check code.
83
86
* @param dependencyCheck the code to set.
84
87
* Must be one of the constants defined in {@link AbstractBeanDefinition}.
88
+ * @see AbstractBeanDefinition#setDependencyCheck
85
89
*/
86
90
public void setDependencyCheck (int dependencyCheck ) {
87
91
this .dependencyCheck = dependencyCheck ;
@@ -96,6 +100,10 @@ public int getDependencyCheck() {
96
100
97
101
/**
98
102
* Set the name of the default initializer method.
103
+ * <p>Note that this method is not enforced on all affected bean definitions
104
+ * but rather taken as an optional callback, to be invoked if actually present.
105
+ * @see AbstractBeanDefinition#setInitMethodName
106
+ * @see AbstractBeanDefinition#setEnforceInitMethod
99
107
*/
100
108
public void setInitMethodName (@ Nullable String initMethodName ) {
101
109
this .initMethodName = (StringUtils .hasText (initMethodName ) ? initMethodName : null );
@@ -111,6 +119,10 @@ public String getInitMethodName() {
111
119
112
120
/**
113
121
* Set the name of the default destroy method.
122
+ * <p>Note that this method is not enforced on all affected bean definitions
123
+ * but rather taken as an optional callback, to be invoked if actually present.
124
+ * @see AbstractBeanDefinition#setDestroyMethodName
125
+ * @see AbstractBeanDefinition#setEnforceDestroyMethod
114
126
*/
115
127
public void setDestroyMethodName (@ Nullable String destroyMethodName ) {
116
128
this .destroyMethodName = (StringUtils .hasText (destroyMethodName ) ? destroyMethodName : null );
0 commit comments