RandomString Class — spring-boot Architecture
Architecture documentation for the RandomString class in RandomString.java from the spring-boot codebase.
Entity Profile
Source Code
buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/type/RandomString.java lines 29–46
final class RandomString {
private static final Random random = new Random();
private RandomString() {
}
static String generate(String prefix, int randomLength) {
Assert.notNull(prefix, "'prefix' must not be null");
return prefix + generateRandom(randomLength);
}
static CharSequence generateRandom(int length) {
IntStream chars = random.ints('a', 'z' + 1).limit(length);
return chars.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append);
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free