Polish
This commit is contained in:
@@ -27,7 +27,6 @@ import java.util.Set;
|
|||||||
import java.util.function.IntFunction;
|
import java.util.function.IntFunction;
|
||||||
|
|
||||||
import org.springframework.core.ResolvableType;
|
import org.springframework.core.ResolvableType;
|
||||||
import org.springframework.lang.Nullable;
|
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
@@ -111,7 +110,6 @@ public enum AccessVisibility {
|
|||||||
return forResolvableType(resolvableType, new HashSet<>());
|
return forResolvableType(resolvableType, new HashSet<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
|
||||||
private static AccessVisibility forResolvableType(ResolvableType resolvableType,
|
private static AccessVisibility forResolvableType(ResolvableType resolvableType,
|
||||||
Set<ResolvableType> seen) {
|
Set<ResolvableType> seen) {
|
||||||
if (!seen.add(resolvableType)) {
|
if (!seen.add(resolvableType)) {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public final class GeneratedMethod {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.name.toString();
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ public class GeneratedMethods {
|
|||||||
private final List<GeneratedMethod> generatedMethods;
|
private final List<GeneratedMethod> generatedMethods;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@link GeneratedMethods} instance backed by the given
|
* Create a new {@link GeneratedMethods} using the specified method name
|
||||||
* {@link MethodNameGenerator}.
|
* generator.
|
||||||
* @param methodNameGenerator the method name generator
|
* @param methodNameGenerator the method name generator
|
||||||
*/
|
*/
|
||||||
GeneratedMethods(Function<MethodName, String> methodNameGenerator) {
|
GeneratedMethods(Function<MethodName, String> methodNameGenerator) {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package org.springframework.aot.generate;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.springframework.lang.Nullable;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
@@ -115,7 +116,7 @@ final class MethodName {
|
|||||||
.map(StringUtils::capitalize).collect(Collectors.joining()));
|
.map(StringUtils::capitalize).collect(Collectors.joining()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String clean(String part) {
|
private static String clean(@Nullable String part) {
|
||||||
char[] chars = (part != null) ? part.toCharArray() : new char[0];
|
char[] chars = (part != null) ? part.toCharArray() : new char[0];
|
||||||
StringBuilder name = new StringBuilder(chars.length);
|
StringBuilder name = new StringBuilder(chars.length);
|
||||||
boolean uppercase = false;
|
boolean uppercase = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user