publicclassAAA{classBBB{}publicstaticvoidmain(String[] args){// 数组System.out.println(String[].class.getName());// [Ljava.lang.String;System.out.println(String[].class.getCanonicalName());// java.lang.String[]System.out.println(String[].class.getSimpleName());// String[]System.out.pr...
getCanonicalName(); } else if (type instanceof ParameterizedType) { ParameterizedType pType = (ParameterizedType) type; StringBuilder sb = new StringBuilder(getRawClass(pType).getCanonicalName()); sb.append('<'); final Type[] actualTypeArguments = pType.getActualTypeArguments(); for (int i ...
getClassName()).orElse(false); } 代码示例来源:origin: aol/micro-server @Test public void namingClasses() { System.out.println(ActiveEventsTest.class.getCanonicalName()); System.out.println(ActiveEventsTest.class.getName()); System.out.println(ActiveEventsTest.class.getSimpleName()); System....
CanonicalName: java.lang.Integer[] packagecom.logicbig.example.clazz; publicclassGetTypeNameExample3{ publicstaticvoidmain(String...args){ Class<Void>c=void.class; System.out.println("TypeName: "+c.getTypeName()); System.out.println("Name: "+c.getName()); ...
(typeName.equals(clazz.getTypeName())||typeName.equals(clazz.getSimpleName())); } 代码示例来源:origin: spring-projects/spring-framework /** * Return a descriptive name for the given object's type: usually simply * the class name, but component type class name + "[]" for arrays, *...