1 16 package com.google.gwt.dev.util.msg; 17 18 21 public final class FormatterForClass extends Formatter { 22 23 public String format(Object toFormat) { 24 return getNiceTypeName((Class ) toFormat); 25 } 26 27 private String getNiceTypeName(Class targetType) { 28 if (targetType.isArray()) { 31 return getNiceTypeName(targetType.getComponentType()) + "[]"; 32 } else { 33 return targetType.getName(); 34 } 35 } 36 } 37 | Popular Tags |