1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.beans.factory.support;
18
19 import java.lang.reflect.Constructor;
20 import java.util.Arrays;
21 import java.util.LinkedHashMap;
22 import java.util.LinkedHashSet;
23 import java.util.Map;
24 import java.util.Set;
25
26 import org.springframework.beans.BeanMetadataAttributeAccessor;
27 import org.springframework.beans.MutablePropertyValues;
28 import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
29 import org.springframework.beans.factory.config.BeanDefinition;
30 import org.springframework.beans.factory.config.ConstructorArgumentValues;
31 import org.springframework.core.io.DescriptiveResource;
32 import org.springframework.core.io.Resource;
33 import org.springframework.util.Assert;
34 import org.springframework.util.ClassUtils;
35 import org.springframework.util.ObjectUtils;
36 import org.springframework.util.StringUtils;
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 @SuppressWarnings("serial")
56 public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccessor
57 implements BeanDefinition, Cloneable {
58
59
60
61
62
63 public static final String SCOPE_DEFAULT = "";
64
65
66
67
68
69 public static final int AUTOWIRE_NO = AutowireCapableBeanFactory.AUTOWIRE_NO;
70
71
72
73
74
75 public static final int AUTOWIRE_BY_NAME = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME;
76
77
78
79
80
81 public static final int AUTOWIRE_BY_TYPE = AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE;
82
83
84
85
86
87 public static final int AUTOWIRE_CONSTRUCTOR = AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR;
88
89
90
91
92
93
94
95
96 @Deprecated
97 public static final int AUTOWIRE_AUTODETECT = AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT;
98
99
100
101
102
103 public static final int DEPENDENCY_CHECK_NONE = 0;
104
105
106
107
108
109 public static final int DEPENDENCY_CHECK_OBJECTS = 1;
110
111
112
113
114
115
116 public static final int DEPENDENCY_CHECK_SIMPLE = 2;
117
118
119
120
121
122
123 public static final int DEPENDENCY_CHECK_ALL = 3;
124
125
126
127
128
129
130
131
132
133
134
135 public static final String INFER_METHOD = "(inferred)";
136
137
138 private volatile Object beanClass;
139
140 private String scope = SCOPE_DEFAULT;
141
142 private boolean abstractFlag = false;
143
144 private boolean lazyInit = false;
145
146 private int autowireMode = AUTOWIRE_NO;
147
148 private int dependencyCheck = DEPENDENCY_CHECK_NONE;
149
150 private String[] dependsOn;
151
152 private boolean autowireCandidate = true;
153
154 private boolean primary = false;
155
156 private final Map<String, AutowireCandidateQualifier> qualifiers =
157 new LinkedHashMap<String, AutowireCandidateQualifier>(0);
158
159 private boolean nonPublicAccessAllowed = true;
160
161 private boolean lenientConstructorResolution = true;
162
163 private ConstructorArgumentValues constructorArgumentValues;
164
165 private MutablePropertyValues propertyValues;
166
167 private MethodOverrides methodOverrides = new MethodOverrides();
168
169 private String factoryBeanName;
170
171 private String factoryMethodName;
172
173 private String initMethodName;
174
175 private String destroyMethodName;
176
177 private boolean enforceInitMethod = true;
178
179 private boolean enforceDestroyMethod = true;
180
181 private boolean synthetic = false;
182
183 private int role = BeanDefinition.ROLE_APPLICATION;
184
185 private String description;
186
187 private Resource resource;
188
189
190
191
192
193 protected AbstractBeanDefinition() {
194 this(null, null);
195 }
196
197
198
199
200
201 protected AbstractBeanDefinition(ConstructorArgumentValues cargs, MutablePropertyValues pvs) {
202 setConstructorArgumentValues(cargs);
203 setPropertyValues(pvs);
204 }
205
206
207
208
209
210
211 protected AbstractBeanDefinition(BeanDefinition original) {
212 setParentName(original.getParentName());
213 setBeanClassName(original.getBeanClassName());
214 setFactoryBeanName(original.getFactoryBeanName());
215 setFactoryMethodName(original.getFactoryMethodName());
216 setScope(original.getScope());
217 setAbstract(original.isAbstract());
218 setLazyInit(original.isLazyInit());
219 setRole(original.getRole());
220 setConstructorArgumentValues(new ConstructorArgumentValues(original.getConstructorArgumentValues()));
221 setPropertyValues(new MutablePropertyValues(original.getPropertyValues()));
222 setSource(original.getSource());
223 copyAttributesFrom(original);
224
225 if (original instanceof AbstractBeanDefinition) {
226 AbstractBeanDefinition originalAbd = (AbstractBeanDefinition) original;
227 if (originalAbd.hasBeanClass()) {
228 setBeanClass(originalAbd.getBeanClass());
229 }
230 setAutowireMode(originalAbd.getAutowireMode());
231 setDependencyCheck(originalAbd.getDependencyCheck());
232 setDependsOn(originalAbd.getDependsOn());
233 setAutowireCandidate(originalAbd.isAutowireCandidate());
234 copyQualifiersFrom(originalAbd);
235 setPrimary(originalAbd.isPrimary());
236 setNonPublicAccessAllowed(originalAbd.isNonPublicAccessAllowed());
237 setLenientConstructorResolution(originalAbd.isLenientConstructorResolution());
238 setInitMethodName(originalAbd.getInitMethodName());
239 setEnforceInitMethod(originalAbd.isEnforceInitMethod());
240 setDestroyMethodName(originalAbd.getDestroyMethodName());
241 setEnforceDestroyMethod(originalAbd.isEnforceDestroyMethod());
242 setMethodOverrides(new MethodOverrides(originalAbd.getMethodOverrides()));
243 setSynthetic(originalAbd.isSynthetic());
244 setResource(originalAbd.getResource());
245 }
246 else {
247 setResourceDescription(original.getResourceDescription());
248 }
249 }
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268 public void overrideFrom(BeanDefinition other) {
269 if (StringUtils.hasLength(other.getBeanClassName())) {
270 setBeanClassName(other.getBeanClassName());
271 }
272 if (StringUtils.hasLength(other.getFactoryBeanName())) {
273 setFactoryBeanName(other.getFactoryBeanName());
274 }
275 if (StringUtils.hasLength(other.getFactoryMethodName())) {
276 setFactoryMethodName(other.getFactoryMethodName());
277 }
278 if (StringUtils.hasLength(other.getScope())) {
279 setScope(other.getScope());
280 }
281 setAbstract(other.isAbstract());
282 setLazyInit(other.isLazyInit());
283 setRole(other.getRole());
284 getConstructorArgumentValues().addArgumentValues(other.getConstructorArgumentValues());
285 getPropertyValues().addPropertyValues(other.getPropertyValues());
286 setSource(other.getSource());
287 copyAttributesFrom(other);
288
289 if (other instanceof AbstractBeanDefinition) {
290 AbstractBeanDefinition otherAbd = (AbstractBeanDefinition) other;
291 if (otherAbd.hasBeanClass()) {
292 setBeanClass(otherAbd.getBeanClass());
293 }
294 setAutowireCandidate(otherAbd.isAutowireCandidate());
295 setAutowireMode(otherAbd.getAutowireMode());
296 copyQualifiersFrom(otherAbd);
297 setPrimary(otherAbd.isPrimary());
298 setDependencyCheck(otherAbd.getDependencyCheck());
299 setDependsOn(otherAbd.getDependsOn());
300 setNonPublicAccessAllowed(otherAbd.isNonPublicAccessAllowed());
301 setLenientConstructorResolution(otherAbd.isLenientConstructorResolution());
302 if (StringUtils.hasLength(otherAbd.getInitMethodName())) {
303 setInitMethodName(otherAbd.getInitMethodName());
304 setEnforceInitMethod(otherAbd.isEnforceInitMethod());
305 }
306 if (StringUtils.hasLength(otherAbd.getDestroyMethodName())) {
307 setDestroyMethodName(otherAbd.getDestroyMethodName());
308 setEnforceDestroyMethod(otherAbd.isEnforceDestroyMethod());
309 }
310 getMethodOverrides().addOverrides(otherAbd.getMethodOverrides());
311 setSynthetic(otherAbd.isSynthetic());
312 setResource(otherAbd.getResource());
313 }
314 else {
315 setResourceDescription(other.getResourceDescription());
316 }
317 }
318
319
320
321
322
323 public void applyDefaults(BeanDefinitionDefaults defaults) {
324 setLazyInit(defaults.isLazyInit());
325 setAutowireMode(defaults.getAutowireMode());
326 setDependencyCheck(defaults.getDependencyCheck());
327 setInitMethodName(defaults.getInitMethodName());
328 setEnforceInitMethod(false);
329 setDestroyMethodName(defaults.getDestroyMethodName());
330 setEnforceDestroyMethod(false);
331 }
332
333
334
335
336
337 public boolean hasBeanClass() {
338 return (this.beanClass instanceof Class);
339 }
340
341
342
343
344 public void setBeanClass(Class<?> beanClass) {
345 this.beanClass = beanClass;
346 }
347
348
349
350
351
352
353
354 public Class<?> getBeanClass() throws IllegalStateException {
355 Object beanClassObject = this.beanClass;
356 if (beanClassObject == null) {
357 throw new IllegalStateException("No bean class specified on bean definition");
358 }
359 if (!(beanClassObject instanceof Class)) {
360 throw new IllegalStateException(
361 "Bean class name [" + beanClassObject + "] has not been resolved into an actual Class");
362 }
363 return (Class<?>) beanClassObject;
364 }
365
366 @Override
367 public void setBeanClassName(String beanClassName) {
368 this.beanClass = beanClassName;
369 }
370
371 @Override
372 public String getBeanClassName() {
373 Object beanClassObject = this.beanClass;
374 if (beanClassObject instanceof Class) {
375 return ((Class<?>) beanClassObject).getName();
376 }
377 else {
378 return (String) beanClassObject;
379 }
380 }
381
382
383
384
385
386
387
388
389
390 public Class<?> resolveBeanClass(ClassLoader classLoader) throws ClassNotFoundException {
391 String className = getBeanClassName();
392 if (className == null) {
393 return null;
394 }
395 Class<?> resolvedClass = ClassUtils.forName(className, classLoader);
396 this.beanClass = resolvedClass;
397 return resolvedClass;
398 }
399
400
401
402
403
404
405
406
407
408
409
410
411 @Override
412 public void setScope(String scope) {
413 this.scope = scope;
414 }
415
416
417
418
419 @Override
420 public String getScope() {
421 return this.scope;
422 }
423
424
425
426
427
428
429 @Override
430 public boolean isSingleton() {
431 return SCOPE_SINGLETON.equals(scope) || SCOPE_DEFAULT.equals(scope);
432 }
433
434
435
436
437
438
439 @Override
440 public boolean isPrototype() {
441 return SCOPE_PROTOTYPE.equals(scope);
442 }
443
444
445
446
447
448
449
450 public void setAbstract(boolean abstractFlag) {
451 this.abstractFlag = abstractFlag;
452 }
453
454
455
456
457
458 @Override
459 public boolean isAbstract() {
460 return this.abstractFlag;
461 }
462
463
464
465
466
467
468 @Override
469 public void setLazyInit(boolean lazyInit) {
470 this.lazyInit = lazyInit;
471 }
472
473
474
475
476
477 @Override
478 public boolean isLazyInit() {
479 return this.lazyInit;
480 }
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495 public void setAutowireMode(int autowireMode) {
496 this.autowireMode = autowireMode;
497 }
498
499
500
501
502 public int getAutowireMode() {
503 return this.autowireMode;
504 }
505
506
507
508
509
510
511
512
513 public int getResolvedAutowireMode() {
514 if (this.autowireMode == AUTOWIRE_AUTODETECT) {
515
516
517
518 Constructor<?>[] constructors = getBeanClass().getConstructors();
519 for (Constructor<?> constructor : constructors) {
520 if (constructor.getParameterTypes().length == 0) {
521 return AUTOWIRE_BY_TYPE;
522 }
523 }
524 return AUTOWIRE_CONSTRUCTOR;
525 }
526 else {
527 return this.autowireMode;
528 }
529 }
530
531
532
533
534
535
536
537
538
539
540 public void setDependencyCheck(int dependencyCheck) {
541 this.dependencyCheck = dependencyCheck;
542 }
543
544
545
546
547 public int getDependencyCheck() {
548 return this.dependencyCheck;
549 }
550
551
552
553
554
555
556
557
558 @Override
559 public void setDependsOn(String... dependsOn) {
560 this.dependsOn = dependsOn;
561 }
562
563
564
565
566 @Override
567 public String[] getDependsOn() {
568 return this.dependsOn;
569 }
570
571
572
573
574 @Override
575 public void setAutowireCandidate(boolean autowireCandidate) {
576 this.autowireCandidate = autowireCandidate;
577 }
578
579
580
581
582 @Override
583 public boolean isAutowireCandidate() {
584 return this.autowireCandidate;
585 }
586
587
588
589
590
591
592 @Override
593 public void setPrimary(boolean primary) {
594 this.primary = primary;
595 }
596
597
598
599
600
601
602 @Override
603 public boolean isPrimary() {
604 return this.primary;
605 }
606
607
608
609
610
611
612 public void addQualifier(AutowireCandidateQualifier qualifier) {
613 this.qualifiers.put(qualifier.getTypeName(), qualifier);
614 }
615
616
617
618
619 public boolean hasQualifier(String typeName) {
620 return this.qualifiers.keySet().contains(typeName);
621 }
622
623
624
625
626 public AutowireCandidateQualifier getQualifier(String typeName) {
627 return this.qualifiers.get(typeName);
628 }
629
630
631
632
633
634 public Set<AutowireCandidateQualifier> getQualifiers() {
635 return new LinkedHashSet<AutowireCandidateQualifier>(this.qualifiers.values());
636 }
637
638
639
640
641
642 public void copyQualifiersFrom(AbstractBeanDefinition source) {
643 Assert.notNull(source, "Source must not be null");
644 this.qualifiers.putAll(source.qualifiers);
645 }
646
647
648
649
650
651
652
653
654
655
656
657
658
659 public void setNonPublicAccessAllowed(boolean nonPublicAccessAllowed) {
660 this.nonPublicAccessAllowed = nonPublicAccessAllowed;
661 }
662
663
664
665
666 public boolean isNonPublicAccessAllowed() {
667 return this.nonPublicAccessAllowed;
668 }
669
670
671
672
673
674
675
676 public void setLenientConstructorResolution(boolean lenientConstructorResolution) {
677 this.lenientConstructorResolution = lenientConstructorResolution;
678 }
679
680
681
682
683 public boolean isLenientConstructorResolution() {
684 return this.lenientConstructorResolution;
685 }
686
687
688
689
690 public void setConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) {
691 this.constructorArgumentValues =
692 (constructorArgumentValues != null ? constructorArgumentValues : new ConstructorArgumentValues());
693 }
694
695
696
697
698 @Override
699 public ConstructorArgumentValues getConstructorArgumentValues() {
700 return this.constructorArgumentValues;
701 }
702
703
704
705
706 public boolean hasConstructorArgumentValues() {
707 return !this.constructorArgumentValues.isEmpty();
708 }
709
710
711
712
713 public void setPropertyValues(MutablePropertyValues propertyValues) {
714 this.propertyValues = (propertyValues != null ? propertyValues : new MutablePropertyValues());
715 }
716
717
718
719
720 @Override
721 public MutablePropertyValues getPropertyValues() {
722 return this.propertyValues;
723 }
724
725
726
727
728 public void setMethodOverrides(MethodOverrides methodOverrides) {
729 this.methodOverrides = (methodOverrides != null ? methodOverrides : new MethodOverrides());
730 }
731
732
733
734
735
736
737 public MethodOverrides getMethodOverrides() {
738 return this.methodOverrides;
739 }
740
741
742 @Override
743 public void setFactoryBeanName(String factoryBeanName) {
744 this.factoryBeanName = factoryBeanName;
745 }
746
747 @Override
748 public String getFactoryBeanName() {
749 return this.factoryBeanName;
750 }
751
752 @Override
753 public void setFactoryMethodName(String factoryMethodName) {
754 this.factoryMethodName = factoryMethodName;
755 }
756
757 @Override
758 public String getFactoryMethodName() {
759 return this.factoryMethodName;
760 }
761
762
763
764
765
766 public void setInitMethodName(String initMethodName) {
767 this.initMethodName = initMethodName;
768 }
769
770
771
772
773 public String getInitMethodName() {
774 return this.initMethodName;
775 }
776
777
778
779
780
781
782 public void setEnforceInitMethod(boolean enforceInitMethod) {
783 this.enforceInitMethod = enforceInitMethod;
784 }
785
786
787
788
789
790 public boolean isEnforceInitMethod() {
791 return this.enforceInitMethod;
792 }
793
794
795
796
797
798 public void setDestroyMethodName(String destroyMethodName) {
799 this.destroyMethodName = destroyMethodName;
800 }
801
802
803
804
805 public String getDestroyMethodName() {
806 return this.destroyMethodName;
807 }
808
809
810
811
812
813
814 public void setEnforceDestroyMethod(boolean enforceDestroyMethod) {
815 this.enforceDestroyMethod = enforceDestroyMethod;
816 }
817
818
819
820
821
822 public boolean isEnforceDestroyMethod() {
823 return this.enforceDestroyMethod;
824 }
825
826
827
828
829
830
831
832 public void setSynthetic(boolean synthetic) {
833 this.synthetic = synthetic;
834 }
835
836
837
838
839
840 public boolean isSynthetic() {
841 return this.synthetic;
842 }
843
844
845
846
847 public void setRole(int role) {
848 this.role = role;
849 }
850
851
852
853
854 @Override
855 public int getRole() {
856 return this.role;
857 }
858
859
860
861
862
863 public void setDescription(String description) {
864 this.description = description;
865 }
866
867 @Override
868 public String getDescription() {
869 return this.description;
870 }
871
872
873
874
875
876 public void setResource(Resource resource) {
877 this.resource = resource;
878 }
879
880
881
882
883 public Resource getResource() {
884 return this.resource;
885 }
886
887
888
889
890
891 public void setResourceDescription(String resourceDescription) {
892 this.resource = new DescriptiveResource(resourceDescription);
893 }
894
895 @Override
896 public String getResourceDescription() {
897 return (this.resource != null ? this.resource.getDescription() : null);
898 }
899
900
901
902
903 public void setOriginatingBeanDefinition(BeanDefinition originatingBd) {
904 this.resource = new BeanDefinitionResource(originatingBd);
905 }
906
907 @Override
908 public BeanDefinition getOriginatingBeanDefinition() {
909 return (this.resource instanceof BeanDefinitionResource ?
910 ((BeanDefinitionResource) this.resource).getBeanDefinition() : null);
911 }
912
913
914
915
916
917 public void validate() throws BeanDefinitionValidationException {
918 if (!getMethodOverrides().isEmpty() && getFactoryMethodName() != null) {
919 throw new BeanDefinitionValidationException(
920 "Cannot combine static factory method with method overrides: " +
921 "the static factory method must create the instance");
922 }
923
924 if (hasBeanClass()) {
925 prepareMethodOverrides();
926 }
927 }
928
929
930
931
932
933
934 public void prepareMethodOverrides() throws BeanDefinitionValidationException {
935
936 MethodOverrides methodOverrides = getMethodOverrides();
937 if (!methodOverrides.isEmpty()) {
938 for (MethodOverride mo : methodOverrides.getOverrides()) {
939 prepareMethodOverride(mo);
940 }
941 }
942 }
943
944
945
946
947
948
949
950
951 protected void prepareMethodOverride(MethodOverride mo) throws BeanDefinitionValidationException {
952 int count = ClassUtils.getMethodCountForName(getBeanClass(), mo.getMethodName());
953 if (count == 0) {
954 throw new BeanDefinitionValidationException(
955 "Invalid method override: no method with name '" + mo.getMethodName() +
956 "' on class [" + getBeanClassName() + "]");
957 }
958 else if (count == 1) {
959
960 mo.setOverloaded(false);
961 }
962 }
963
964
965
966
967
968
969
970 @Override
971 public Object clone() {
972 return cloneBeanDefinition();
973 }
974
975
976
977
978
979
980 public abstract AbstractBeanDefinition cloneBeanDefinition();
981
982
983 @Override
984 public boolean equals(Object other) {
985 if (this == other) {
986 return true;
987 }
988 if (!(other instanceof AbstractBeanDefinition)) {
989 return false;
990 }
991
992 AbstractBeanDefinition that = (AbstractBeanDefinition) other;
993
994 if (!ObjectUtils.nullSafeEquals(getBeanClassName(), that.getBeanClassName())) return false;
995 if (!ObjectUtils.nullSafeEquals(this.scope, that.scope)) return false;
996 if (this.abstractFlag != that.abstractFlag) return false;
997 if (this.lazyInit != that.lazyInit) return false;
998
999 if (this.autowireMode != that.autowireMode) return false;
1000 if (this.dependencyCheck != that.dependencyCheck) return false;
1001 if (!Arrays.equals(this.dependsOn, that.dependsOn)) return false;
1002 if (this.autowireCandidate != that.autowireCandidate) return false;
1003 if (!ObjectUtils.nullSafeEquals(this.qualifiers, that.qualifiers)) return false;
1004 if (this.primary != that.primary) return false;
1005
1006 if (this.nonPublicAccessAllowed != that.nonPublicAccessAllowed) return false;
1007 if (this.lenientConstructorResolution != that.lenientConstructorResolution) return false;
1008 if (!ObjectUtils.nullSafeEquals(this.constructorArgumentValues, that.constructorArgumentValues)) return false;
1009 if (!ObjectUtils.nullSafeEquals(this.propertyValues, that.propertyValues)) return false;
1010 if (!ObjectUtils.nullSafeEquals(this.methodOverrides, that.methodOverrides)) return false;
1011
1012 if (!ObjectUtils.nullSafeEquals(this.factoryBeanName, that.factoryBeanName)) return false;
1013 if (!ObjectUtils.nullSafeEquals(this.factoryMethodName, that.factoryMethodName)) return false;
1014 if (!ObjectUtils.nullSafeEquals(this.initMethodName, that.initMethodName)) return false;
1015 if (this.enforceInitMethod != that.enforceInitMethod) return false;
1016 if (!ObjectUtils.nullSafeEquals(this.destroyMethodName, that.destroyMethodName)) return false;
1017 if (this.enforceDestroyMethod != that.enforceDestroyMethod) return false;
1018
1019 if (this.synthetic != that.synthetic) return false;
1020 if (this.role != that.role) return false;
1021
1022 return super.equals(other);
1023 }
1024
1025 @Override
1026 public int hashCode() {
1027 int hashCode = ObjectUtils.nullSafeHashCode(getBeanClassName());
1028 hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.scope);
1029 hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.constructorArgumentValues);
1030 hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.propertyValues);
1031 hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.factoryBeanName);
1032 hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.factoryMethodName);
1033 hashCode = 29 * hashCode + super.hashCode();
1034 return hashCode;
1035 }
1036
1037 @Override
1038 public String toString() {
1039 StringBuilder sb = new StringBuilder("class [");
1040 sb.append(getBeanClassName()).append("]");
1041 sb.append("; scope=").append(this.scope);
1042 sb.append("; abstract=").append(this.abstractFlag);
1043 sb.append("; lazyInit=").append(this.lazyInit);
1044 sb.append("; autowireMode=").append(this.autowireMode);
1045 sb.append("; dependencyCheck=").append(this.dependencyCheck);
1046 sb.append("; autowireCandidate=").append(this.autowireCandidate);
1047 sb.append("; primary=").append(this.primary);
1048 sb.append("; factoryBeanName=").append(this.factoryBeanName);
1049 sb.append("; factoryMethodName=").append(this.factoryMethodName);
1050 sb.append("; initMethodName=").append(this.initMethodName);
1051 sb.append("; destroyMethodName=").append(this.destroyMethodName);
1052 if (this.resource != null) {
1053 sb.append("; defined in ").append(this.resource.getDescription());
1054 }
1055 return sb.toString();
1056 }
1057
1058 }