}
private String getBinaryOrPrimitiveName(JType type) {
JArrayType asArray = type.isArray();
JClassType asClass = type.isClassOrInterface();
JPrimitiveType asPrimitive = type.isPrimitive();
if (asClass != null) {
return getBinaryName(asClass);
} else if (asPrimitive != null) {
return asPrimitive.getQualifiedSourceName();
} else if (asArray != null) {
JType componentType = asArray.getComponentType();
return getBinaryOrPrimitiveName(componentType) + "[]";
} else {
throw new InternalCompilerException("Cannot create binary name for "