/** * Needed to convert java style class names to classloaded class names. From: java.lang.String[] * To: [Ljava.lang.String; * * @param javaStyle Description of the Parameter * @return Description of the Return Value */ private String transJavaToClass(String javaStyle) { String className = javaStyle; int arrayCount = 0; while (className.endsWith("[]")) { // Counts how may arrays are in this class name arrayCount++; className = className.substring(0, className.length() - 2); } // No array around, nothing to do. if (arrayCount <= 0) { return className; } String replace = (String) primiMap.get(className); // If I can substitute the name I will do it if (replace != null) { className = replace; } else { className = "L" + className + ";"; } while (arrayCount-- > 0) { className = "[" + className; } return className; }