protected static boolean isSafeName(@Nonnull String name) {
		// Name must not be empty.
		if (name.isEmpty())
			return false;

		// Must be comprised of valid identifier characters.
		char first = name.charAt(0);
		if (!Character.isJavaIdentifierStart(first))
			return false;
		char[] chars = name.toCharArray();
		for (int i = 1; i < chars.length; i++) {
			if (!Character.isJavaIdentifierPart(chars[i]))
				return false;
		}

		// Cannot be a reserved keyword.
		return !Keywords.getKeywords().contains(name);
	}
@param name
		Name to check.

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