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.
This commit is contained in:
Phillip Webb 2022-09-01 13:37:08 -07:00
parent a5584dcaa6
commit cfd37d948d
2 changed files with 4 additions and 4 deletions

View File

@ -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 {
* @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);
}

View File

@ -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 {
private final Set<MemberCategory> memberCategories = new HashSet<>();
public Builder(TypeReference type) {
Builder(TypeReference type) {
this.type = type;
}