return result;
}
private static String _getClassReference(MetaType metaClass, Context context, boolean typeParms) {
MetaClass erased;
if (metaClass instanceof MetaClass) {
erased = ((MetaClass) metaClass).getErased();
}
else if (metaClass instanceof MetaParameterizedType) {
MetaParameterizedType parameterizedType = (MetaParameterizedType) metaClass;
return parameterizedType.toString();
}
else if (metaClass instanceof MetaTypeVariable) {
MetaTypeVariable parameterizedType = (MetaTypeVariable) metaClass;
return parameterizedType.getName();
}
else if (metaClass instanceof MetaWildcardType) {
MetaWildcardType wildCardType = (MetaWildcardType) metaClass;
return wildCardType.toString();
}
else {
throw new RuntimeException("unknown class reference type: " + metaClass);
}
String fqcn = erased.getCanonicalName();
int idx = fqcn.lastIndexOf('.');
if (idx != -1) {
if ((context.isAutoImportActive() || "java.lang".equals(erased.getPackageName()))
&& !context.hasImport(erased)) {
context.addImport(erased);
}
if (context.hasImport(erased)) {