The Character class in Java defines methods which check a given char argument for equality with certain Unicode chars or for belonging to some type category. These chars and type categories are named.
As stated in given javadoc, examples for named chars are
HORIZONTAL TABULATION, FORM FEED, ...;
example for named type categories are
SPACE_SEPARATOR, PARAGRAPH_SEPARATOR, ...
However, being byte or int values instead of enums, the name of these types are "hidden" at runtime.
So, is there a possibility to get characters' and/or type categories' names at runtime?
解决方案
JDK7 will have a
String getName(int codepoint)
function (READ: a “static method” in class java.lang.Character) that will turn a codepoint into its official Unicode name.