@@ -34,14 +34,14 @@ public class BeanCreatingHandlerProvider<T> implements BeanFactoryAware {
34
34
35
35
private static final Log logger = LogFactory .getLog (BeanCreatingHandlerProvider .class );
36
36
37
- private final Class <? extends T > handlerClass ;
37
+ private final Class <? extends T > handlerType ;
38
38
39
39
private AutowireCapableBeanFactory beanFactory ;
40
40
41
41
42
- public BeanCreatingHandlerProvider (Class <? extends T > handlerClass ) {
43
- Assert .notNull (handlerClass , "handlerClass is required" );
44
- this .handlerClass = handlerClass ;
42
+ public BeanCreatingHandlerProvider (Class <? extends T > handlerType ) {
43
+ Assert .notNull (handlerType , "handlerType is required" );
44
+ this .handlerType = handlerType ;
45
45
}
46
46
47
47
@@ -52,24 +52,20 @@ public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
52
52
}
53
53
}
54
54
55
- public boolean isSingleton () {
56
- return false ;
57
- }
58
-
59
55
public Class <? extends T > getHandlerType () {
60
- return this .handlerClass ;
56
+ return this .handlerType ;
61
57
}
62
58
63
59
public T getHandler () {
64
60
if (logger .isTraceEnabled ()) {
65
- logger .trace ("Creating instance for handler type " + this .handlerClass );
61
+ logger .trace ("Creating instance for handler type " + this .handlerType );
66
62
}
67
63
if (this .beanFactory == null ) {
68
64
logger .warn ("No BeanFactory available, attempting to use default constructor" );
69
- return BeanUtils .instantiate (this .handlerClass );
65
+ return BeanUtils .instantiate (this .handlerType );
70
66
}
71
67
else {
72
- return this .beanFactory .createBean (this .handlerClass );
68
+ return this .beanFactory .createBean (this .handlerType );
73
69
}
74
70
}
75
71
@@ -84,7 +80,7 @@ public void destroy(T handler) {
84
80
85
81
@ Override
86
82
public String toString () {
87
- return "BeanCreatingHandlerProvider [handlerClass=" + handlerClass + "]" ;
83
+ return "BeanCreatingHandlerProvider [handlerClass=" + handlerType + "]" ;
88
84
}
89
85
90
86
}
0 commit comments