Browse Source

Reduce visibility of hint factory methods

Reduce the visibility of hint factory methods that return a `Builder`.
Since the `build()` method of the `Builder` is package-private the
factory methods can also be package-private.
pull/29057/head
Phillip Webb 4 years ago
parent
commit
cfd37d948d
  1. 4
      spring-core/src/main/java/org/springframework/aot/hint/ExecutableHint.java
  2. 4
      spring-core/src/main/java/org/springframework/aot/hint/TypeHint.java

4
spring-core/src/main/java/org/springframework/aot/hint/ExecutableHint.java

@ -48,7 +48,7 @@ public final class ExecutableHint extends MemberHint { @@ -48,7 +48,7 @@ public final class ExecutableHint extends MemberHint {
* @param parameterTypes the parameter types of the constructor
* @return a builder
*/
public static Builder ofConstructor(List<TypeReference> parameterTypes) {
static Builder ofConstructor(List<TypeReference> parameterTypes) {
return new Builder("<init>", parameterTypes);
}
@ -58,7 +58,7 @@ public final class ExecutableHint extends MemberHint { @@ -58,7 +58,7 @@ public final class ExecutableHint extends MemberHint {
* @param parameterTypes the parameter types of the method
* @return a builder
*/
public static Builder ofMethod(String name, List<TypeReference> parameterTypes) {
static Builder ofMethod(String name, List<TypeReference> parameterTypes) {
return new Builder(name, parameterTypes);
}

4
spring-core/src/main/java/org/springframework/aot/hint/TypeHint.java

@ -68,7 +68,7 @@ public final class TypeHint implements ConditionalHint { @@ -68,7 +68,7 @@ public final class TypeHint implements ConditionalHint {
* @param type the type to use
* @return a builder
*/
public static Builder of(TypeReference type) {
static Builder of(TypeReference type) {
Assert.notNull(type, "'type' must not be null");
return new Builder(type);
}
@ -145,7 +145,7 @@ public final class TypeHint implements ConditionalHint { @@ -145,7 +145,7 @@ public final class TypeHint implements ConditionalHint {
private final Set<MemberCategory> memberCategories = new HashSet<>();
public Builder(TypeReference type) {
Builder(TypeReference type) {
this.type = type;
}

Loading…
Cancel
Save