/** * Tests whether the given string is the name of a primitive or java.lang type. */ public static boolean isJavaDefaultType(String s) { return getJavaDefaultTypes().contains(s); }
/** * Tests whether the given string is the name of a java.lang type. */ public static boolean isJavaLangType(String s) { return getJavaDefaultTypes().contains(s) && Character.isUpperCase(s.charAt(0)); }