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.
24
24
* @author Mark Fisher
25
25
* @author Juergen Hoeller
26
26
* @since 2.5
27
+ * @see AbstractBeanDefinition#applyDefaults
27
28
*/
28
29
public class BeanDefinitionDefaults {
29
30
@@ -42,6 +43,7 @@ public class BeanDefinitionDefaults {
42
43
* Set whether beans should be lazily initialized by default.
43
44
* <p>If {@code false}, the bean will get instantiated on startup by bean
44
45
* factories that perform eager initialization of singletons.
46
+ * @see AbstractBeanDefinition#setLazyInit
45
47
*/
46
48
public void setLazyInit (boolean lazyInit ) {
47
49
this .lazyInit = lazyInit ;
@@ -63,6 +65,7 @@ public boolean isLazyInit() {
63
65
* (however, there may still be explicit annotation-driven autowiring).
64
66
* @param autowireMode the autowire mode to set.
65
67
* Must be one of the constants defined in {@link AbstractBeanDefinition}.
68
+ * @see AbstractBeanDefinition#setAutowireMode
66
69
*/
67
70
public void setAutowireMode (int autowireMode ) {
68
71
this .autowireMode = autowireMode ;
@@ -79,6 +82,7 @@ public int getAutowireMode() {
79
82
* Set the dependency check code.
80
83
* @param dependencyCheck the code to set.
81
84
* Must be one of the constants defined in {@link AbstractBeanDefinition}.
85
+ * @see AbstractBeanDefinition#setDependencyCheck
82
86
*/
83
87
public void setDependencyCheck (int dependencyCheck ) {
84
88
this .dependencyCheck = dependencyCheck ;
@@ -93,6 +97,10 @@ public int getDependencyCheck() {
93
97
94
98
/**
95
99
* Set the name of the default initializer method.
100
+ * <p>Note that this method is not enforced on all affected bean definitions
101
+ * but rather taken as an optional callback, to be invoked if actually present.
102
+ * @see AbstractBeanDefinition#setInitMethodName
103
+ * @see AbstractBeanDefinition#setEnforceInitMethod
96
104
*/
97
105
public void setInitMethodName (String initMethodName ) {
98
106
this .initMethodName = (StringUtils .hasText (initMethodName ) ? initMethodName : null );
@@ -107,6 +115,10 @@ public String getInitMethodName() {
107
115
108
116
/**
109
117
* Set the name of the default destroy method.
118
+ * <p>Note that this method is not enforced on all affected bean definitions
119
+ * but rather taken as an optional callback, to be invoked if actually present.
120
+ * @see AbstractBeanDefinition#setDestroyMethodName
121
+ * @see AbstractBeanDefinition#setEnforceDestroyMethod
110
122
*/
111
123
public void setDestroyMethodName (String destroyMethodName ) {
112
124
this .destroyMethodName = (StringUtils .hasText (destroyMethodName ) ? destroyMethodName : null );
0 commit comments