### Question:
JavaSymbolName implements Comparable<JavaSymbolName> { public static void assertJavaNameLegal(final String name) { Validate.notNull(name, "Name required"); final char[] value = name.toCharArray(); for (int i = 0; i < value.length; i++) { final char c = value[i]; if ('/' == c || ' ' == c || '*' == c || '>' == c || '<' == c || '!' == c || '@' == c || '%' == c || '^' == c || '?' == c || '(' == c || ')' == c || '~' == c || '`' == c || '{' == c || '}' == c || '[' == c || ']' == c || '|' == c || '\\' == c || '\'' == c || '+' == c || '-' == c) { throw new IllegalArgumentException("Illegal name '" + name + "' (illegal character)"); } if (i == 0) { if ('1' == c || '2' == c || '3' == c || '4' == c || '5' == c || '6' == c || '7' == c || '8' == c || '9' == c || '0' == c) { throw new IllegalArgumentException("Illegal name '" + name + "' (cannot start with a number)"); } } if (i + 1 == value.length || i == 0) { if ('.' == c) { throw new IllegalArgumentException("Illegal name '" + name + "' (cannot start or end with a period)"); } } } } JavaSymbolName(final String symbolName); static void assertJavaNameLegal(final String name); static String getReadableSymbolName(final String camelCase); static JavaSymbolName getReservedWordSafeName(final JavaType javaType); @Deprecated static JavaSymbolName getReservedWordSaveName(final JavaType javaType); static boolean isLegalJavaName(final String name); int compareTo(final JavaSymbolName o); @Override boolean equals(final Object obj); String getReadableSymbolName(); String getSymbolName(); String getSymbolNameCapitalisedFirstLetter(); String getSymbolNameUnCapitalisedFirstLetter(); @Override int hashCode(); @Override String toString(); static final JavaSymbolName FALSE; static final JavaSymbolName TRUE; }### Answer:
@Test public void testAssertJavaNameLegal() { final String symbolName = "META.INF.web.resources.dojo.1.5.util.shrinksafe.src.org.dojotoolkit.shrinksafe.Compressor"; final JavaSymbolName symbol = new JavaSymbolName(symbolName); assertEquals(symbolName, symbol.getSymbolName()); }