Browse Source

Make BindingReflectionHintsRegistrar protected methods private

In order to keep the maximum of flexibility, this commit makes
shouldSkipType and shouldSkipMembers methods private.

That will allow for example to refactor
BindingReflectionHintsRegistrar in order to support skipping
custom classes specified via @RegisterReflectionForBinding
without having to subclass it.

See gh-29279
pull/29302/head
Sébastien Deleuze 3 years ago
parent
commit
7b4ff5ea74
  1. 14
      spring-core/src/main/java/org/springframework/aot/hint/BindingReflectionHintsRegistrar.java

14
spring-core/src/main/java/org/springframework/aot/hint/BindingReflectionHintsRegistrar.java

@ -63,21 +63,11 @@ public class BindingReflectionHintsRegistrar { @@ -63,21 +63,11 @@ public class BindingReflectionHintsRegistrar {
}
}
/**
* Return whether the type should be skipped.
* @param type the type to evaluate
* @return {@code true} if the type should be skipped
*/
protected boolean shouldSkipType(Class<?> type) {
private boolean shouldSkipType(Class<?> type) {
return type.isPrimitive() || type == Object.class;
}
/**
* Return whether the members of the type should be skipped.
* @param type the type to evaluate
* @return {@code true} if the members of the type should be skipped
*/
protected boolean shouldSkipMembers(Class<?> type) {
private boolean shouldSkipMembers(Class<?> type) {
return type.getCanonicalName().startsWith("java.") || type.isArray();
}

Loading…
Cancel
Save