### Question:
Type { public String getClassName() { switch (sort) { case VOID: return "void"; case BOOLEAN: return "boolean"; case CHAR: return "char"; case BYTE: return "byte"; case SHORT: return "short"; case INT: return "int"; case FLOAT: return "float"; case LONG: return "long"; case DOUBLE: return "double"; case ARRAY: StringBuilder stringBuilder = new StringBuilder(getElementType().getClassName()); for (int i = getDimensions(); i > 0; --i) { stringBuilder.append("[]"); } return stringBuilder.toString(); case OBJECT: case INTERNAL: return valueBuffer.substring(valueBegin, valueEnd).replace('/', '.'); default: throw new AssertionError(); } } private  Type(final int sort, final String valueBuffer, final int valueBegin, final int valueEnd); static Type getType(final String typeDescriptor); static Type getType(final Class<?> clazz); static Type getType(final Constructor<?> constructor); static Type getType(final Method method); Type getElementType(); static Type getObjectType(final String internalName); static Type getMethodType(final String methodDescriptor); static Type getMethodType(final Type returnType, final Type... argumentTypes); Type[] getArgumentTypes(); static Type[] getArgumentTypes(final String methodDescriptor); static Type[] getArgumentTypes(final Method method); Type getReturnType(); static Type getReturnType(final String methodDescriptor); static Type getReturnType(final Method method); String getClassName(); String getInternalName(); static String getInternalName(final Class<?> clazz); String getDescriptor(); static String getDescriptor(final Class<?> clazz); static String getConstructorDescriptor(final Constructor<?> constructor); static String getMethodDescriptor(final Type returnType, final Type... argumentTypes); static String getMethodDescriptor(final Method method); int getSort(); int getDimensions(); int getSize(); int getArgumentsAndReturnSizes(); static int getArgumentsAndReturnSizes(final String methodDescriptor); int getOpcode(final int opcode); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); static final int VOID; static final int BOOLEAN; static final int CHAR; static final int BYTE; static final int SHORT; static final int INT; static final int FLOAT; static final int LONG; static final int DOUBLE; static final int ARRAY; static final int OBJECT; static final int METHOD; static final Type VOID_TYPE; static final Type BOOLEAN_TYPE; static final Type CHAR_TYPE; static final Type BYTE_TYPE; static final Type SHORT_TYPE; static final Type INT_TYPE; static final Type FLOAT_TYPE; static final Type LONG_TYPE; static final Type DOUBLE_TYPE; }### Answer:
@Test public void testGetClassName() { assertEquals("void", Type.VOID_TYPE.getClassName()); assertEquals("boolean", Type.BOOLEAN_TYPE.getClassName()); assertEquals("char", Type.CHAR_TYPE.getClassName()); assertEquals("byte", Type.BYTE_TYPE.getClassName()); assertEquals("short", Type.SHORT_TYPE.getClassName()); assertEquals("int", Type.INT_TYPE.getClassName()); assertEquals("float", Type.FLOAT_TYPE.getClassName()); assertEquals("long", Type.LONG_TYPE.getClassName()); assertEquals("double", Type.DOUBLE_TYPE.getClassName()); assertEquals("I[]", Type.getObjectType("[LI;").getClassName()); assertEquals("java.lang.Object", Type.getObjectType("java/lang/Object").getClassName()); assertEquals("java.lang.Object", Type.getType("Ljava/lang/Object;").getClassName()); }