/** Returns a description for a type suitable for reporting errors to the users. */ public static String getReadableDescription(JType type) { if (type instanceof JArrayType) { JArrayType arrayType = (JArrayType) type; return getReadableDescription(arrayType.getLeafType()) + Strings.repeat("[]", arrayType.getDims()); } return Joiner.on(".").join(type.getCompoundName()); }