52
52
* that returns {@code false}. Filters are {@link Predicate#and(Predicate) combined} so that multiple filters can be
53
53
* taken into account. A type/field/method must pass all filters to be considered for further inspection.
54
54
* <p>
55
- * The collector uses {@link AotServices} to discover implementations of {@link TypeCollectorPredicateProvider } so that
55
+ * The collector uses {@link AotServices} to discover implementations of {@link TypeCollectorFilters } so that
56
56
* components using {@link TypeCollector} can contribute their own filtering logic to exclude types, fields, and methods
57
57
* from being inspected.
58
58
*
@@ -66,8 +66,8 @@ public class TypeCollector {
66
66
67
67
private static final Log logger = LogFactory .getLog (TypeCollector .class );
68
68
69
- private static final AotServices <TypeCollectorPredicateProvider > providers = AotServices .factories ()
70
- .load (TypeCollectorPredicateProvider .class );
69
+ private static final AotServices <TypeCollectorFilters > providers = AotServices .factories ()
70
+ .load (TypeCollectorFilters .class );
71
71
72
72
private Predicate <Class <?>> typeFilter = Predicates .isTrue ();
73
73
@@ -76,7 +76,7 @@ public class TypeCollector {
76
76
private Predicate <Field > fieldFilter = Predicates .isTrue ();
77
77
78
78
/**
79
- * Create a new {@link TypeCollector} applying all {@link TypeCollectorPredicateProvider } discovered through
79
+ * Create a new {@link TypeCollector} applying all {@link TypeCollectorFilters } discovered through
80
80
* {@link AotServices}.
81
81
*/
82
82
public TypeCollector () {
@@ -105,6 +105,7 @@ public TypeCollector filterTypes(Predicate<Class<?>> filter) {
105
105
*
106
106
* @param filter filter predicate matching a {@link Class}.
107
107
* @return {@code this} TypeCollector instance.
108
+ * @since 4.0
108
109
*/
109
110
@ Contract ("_ -> this" )
110
111
public TypeCollector filterMethods (Predicate <Method > filter ) {
@@ -117,6 +118,7 @@ public TypeCollector filterMethods(Predicate<Method> filter) {
117
118
*
118
119
* @param filter filter predicate matching a {@link Class}.
119
120
* @return {@code this} TypeCollector instance.
121
+ * @since 4.0
120
122
*/
121
123
@ Contract ("_ -> this" )
122
124
public TypeCollector filterFields (Predicate <Field > filter ) {
@@ -351,7 +353,7 @@ public int size() {
351
353
* @author Mark Paluch
352
354
* @since 4.0
353
355
*/
354
- public interface TypeCollectorPredicateProvider {
356
+ public interface TypeCollectorFilters {
355
357
356
358
/**
357
359
* Return a predicate to filter types.
@@ -383,12 +385,12 @@ default Predicate<Method> methodPredicate() {
383
385
}
384
386
385
387
/**
386
- * Default implementation of {@link TypeCollectorPredicateProvider } that excludes types from certain packages and
388
+ * Default implementation of {@link TypeCollectorFilters } that excludes types from certain packages and
387
389
* filters out unwanted fields and methods.
388
390
*
389
391
* @since 4.0
390
392
*/
391
- private static class DefaultTypeCollectorPredicateProvider implements TypeCollectorPredicateProvider {
393
+ private static class DefaultTypeCollectorFilters implements TypeCollectorFilters {
392
394
393
395
private static final Set <String > EXCLUDED_DOMAINS = Set .of ("java" , "sun." , "jdk." , "reactor." , "kotlinx." ,
394
396
"kotlin." , "org.springframework.core." , "org.springframework.data.mapping." ,
0 commit comments