boolean (String fqn) { boolean atStart = true; for (int i = 0; i < fqn.length(); i++) { char c = fqn.charAt(i); if (Character.isJavaIdentifierStart(c)) { atStart = false; continue; } if (atStart) return false; if (c == '.') { atStart = true; continue; } if (Character.isJavaIdentifierPart(c)) continue; return false; } return !atStart; }