String (VarType type, boolean getShort, List<TypeAnnotationWriteHelper> typeAnnWriteHelpers) { int tp = type.getType(); StringBuilder sb = new StringBuilder(); typeAnnWriteHelpers = writeTypeAnnotationBeforeType(type, sb, typeAnnWriteHelpers); if (tp <= CodeConstants.TYPE_BOOLEAN) { sb.append(typeNames[tp]); return sb.toString(); } else if (tp == CodeConstants.TYPE_UNKNOWN) { sb.append(UNKNOWN_TYPE_STRING); return sb.toString(); // INFO: should not occur } else if (tp == CodeConstants.TYPE_NULL) { sb.append(NULL_TYPE_STRING); return sb.toString(); // INFO: should not occur } else if (tp == CodeConstants.TYPE_VOID) { sb.append("void"); return sb.toString(); } else if (tp == CodeConstants.TYPE_OBJECT) { String ret; if (getShort) { ret = DecompilerContext.getImportCollector().getNestedName(type.getValue()); } else { ret = buildJavaClassName(type.getValue()); } if (ret == null) { return UNDEFINED_TYPE_STRING; // FIXME: a warning should be logged } List<String> nestedTypes = Arrays.asList(ret.split("\\.")); writeNestedClass(sb, type, nestedTypes, typeAnnWriteHelpers); popNestedTypeAnnotation(typeAnnWriteHelpers); return sb.toString(); } throw new RuntimeException("invalid type"); }