protected static boolean isSafeInternalClassName(@Nonnull String internalName) {
		// Sanity check input
		if (internalName.indexOf('.') >= 0)
			throw new IllegalStateException("Saw source name format, expected internal name format");

		// Extending record directly is not allowed
		if ("java/lang/Record".equals(internalName))
			return false;

		// All package name portions and the class name must be valid names.
		return StringUtil.fastSplit(internalName, true, '/').stream()
				.allMatch(ClassStubGenerator::isSafeName);
	}
@param internalName
		Name to check. Expected to be in the internal format. IE {@code java/lang/String}.

@return {@code true} when it can be used as a class name safely.
recaf-core/src/main/java/software/coley/recaf/services/compile/stub/ClassStubGenerator.java