@@ -437,7 +437,7 @@ public void registerExternallyManagedConfigMember(Member configMember) {
437
437
}
438
438
439
439
/**
440
- * Check whether the given method or field is an externally managed configuration member.
440
+ * Determine if the given method or field is an externally managed configuration member.
441
441
*/
442
442
public boolean isExternallyManagedConfigMember (Member configMember ) {
443
443
synchronized (this .postProcessingLock ) {
@@ -447,7 +447,7 @@ public boolean isExternallyManagedConfigMember(Member configMember) {
447
447
}
448
448
449
449
/**
450
- * Return all externally managed configuration methods and fields (as an immutable Set).
450
+ * Get all externally managed configuration methods and fields (as an immutable Set).
451
451
* @since 5.3.11
452
452
*/
453
453
public Set <Member > getExternallyManagedConfigMembers () {
@@ -459,7 +459,15 @@ public Set<Member> getExternallyManagedConfigMembers() {
459
459
}
460
460
461
461
/**
462
- * Register an externally managed configuration initialization method.
462
+ * Register an externally managed configuration initialization method —
463
+ * for example, a method annotated with JSR-250's
464
+ * {@link javax.annotation.PostConstruct} annotation.
465
+ * <p>The supplied {@code initMethod} may be the
466
+ * {@linkplain Method#getName() simple method name} for non-private methods or the
467
+ * {@linkplain org.springframework.util.ClassUtils#getQualifiedMethodName(Method)
468
+ * qualified method name} for {@code private} methods. A qualified name is
469
+ * necessary for {@code private} methods in order to disambiguate between
470
+ * multiple private methods with the same name within a class hierarchy.
463
471
*/
464
472
public void registerExternallyManagedInitMethod (String initMethod ) {
465
473
synchronized (this .postProcessingLock ) {
@@ -471,7 +479,10 @@ public void registerExternallyManagedInitMethod(String initMethod) {
471
479
}
472
480
473
481
/**
474
- * Check whether the given method name indicates an externally managed initialization method.
482
+ * Determine if the given method name indicates an externally managed
483
+ * initialization method.
484
+ * <p>See {@link #registerExternallyManagedInitMethod} for details
485
+ * regarding the format for the supplied {@code initMethod}.
475
486
*/
476
487
public boolean isExternallyManagedInitMethod (String initMethod ) {
477
488
synchronized (this .postProcessingLock ) {
@@ -484,10 +495,10 @@ public boolean isExternallyManagedInitMethod(String initMethod) {
484
495
* Determine if the given method name indicates an externally managed
485
496
* initialization method, regardless of method visibility.
486
497
* <p>In contrast to {@link #isExternallyManagedInitMethod(String)}, this
487
- * method also returns {@code true} if there is a {@code private} external
488
- * init method that has been
498
+ * method also returns {@code true} if there is a {@code private} externally
499
+ * managed initialization method that has been
489
500
* {@linkplain #registerExternallyManagedInitMethod(String) registered}
490
- * using a fully qualified method name instead of a simple method name.
501
+ * using a qualified method name instead of a simple method name.
491
502
* @since 5.3.17
492
503
*/
493
504
boolean hasAnyExternallyManagedInitMethod (String initMethod ) {
@@ -512,6 +523,8 @@ boolean hasAnyExternallyManagedInitMethod(String initMethod) {
512
523
513
524
/**
514
525
* Return all externally managed initialization methods (as an immutable Set).
526
+ * <p>See {@link #registerExternallyManagedInitMethod} for details
527
+ * regarding the format for the initialization methods in the returned set.
515
528
* @since 5.3.11
516
529
*/
517
530
public Set <String > getExternallyManagedInitMethods () {
@@ -523,7 +536,15 @@ public Set<String> getExternallyManagedInitMethods() {
523
536
}
524
537
525
538
/**
526
- * Register an externally managed configuration destruction method.
539
+ * Register an externally managed configuration destruction method —
540
+ * for example, a method annotated with JSR-250's
541
+ * {@link javax.annotation.PreDestroy} annotation.
542
+ * <p>The supplied {@code destroyMethod} may be the
543
+ * {@linkplain Method#getName() simple method name} for non-private methods or the
544
+ * {@linkplain org.springframework.util.ClassUtils#getQualifiedMethodName(Method)
545
+ * qualified method name} for {@code private} methods. A qualified name is
546
+ * necessary for {@code private} methods in order to disambiguate between
547
+ * multiple private methods with the same name within a class hierarchy.
527
548
*/
528
549
public void registerExternallyManagedDestroyMethod (String destroyMethod ) {
529
550
synchronized (this .postProcessingLock ) {
@@ -535,7 +556,10 @@ public void registerExternallyManagedDestroyMethod(String destroyMethod) {
535
556
}
536
557
537
558
/**
538
- * Check whether the given method name indicates an externally managed destruction method.
559
+ * Determine if the given method name indicates an externally managed
560
+ * destruction method.
561
+ * <p>See {@link #registerExternallyManagedDestroyMethod} for details
562
+ * regarding the format for the supplied {@code destroyMethod}.
539
563
*/
540
564
public boolean isExternallyManagedDestroyMethod (String destroyMethod ) {
541
565
synchronized (this .postProcessingLock ) {
@@ -548,10 +572,10 @@ public boolean isExternallyManagedDestroyMethod(String destroyMethod) {
548
572
* Determine if the given method name indicates an externally managed
549
573
* destruction method, regardless of method visibility.
550
574
* <p>In contrast to {@link #isExternallyManagedDestroyMethod(String)}, this
551
- * method also returns {@code true} if there is a {@code private} external
552
- * destroy method that has been
575
+ * method also returns {@code true} if there is a {@code private} externally
576
+ * managed destruction method that has been
553
577
* {@linkplain #registerExternallyManagedDestroyMethod(String) registered}
554
- * using a fully qualified method name instead of a simple method name.
578
+ * using a qualified method name instead of a simple method name.
555
579
* @since 5.3.17
556
580
*/
557
581
boolean hasAnyExternallyManagedDestroyMethod (String destroyMethod ) {
@@ -575,7 +599,9 @@ boolean hasAnyExternallyManagedDestroyMethod(String destroyMethod) {
575
599
}
576
600
577
601
/**
578
- * Return all externally managed destruction methods (as an immutable Set).
602
+ * Get all externally managed destruction methods (as an immutable Set).
603
+ * <p>See {@link #registerExternallyManagedDestroyMethod} for details
604
+ * regarding the format for the destruction methods in the returned set.
579
605
* @since 5.3.11
580
606
*/
581
607
public Set <String > getExternallyManagedDestroyMethods () {
0 commit comments