/** * Given the internal name of the class, return the 'normal' java name. * * @param internalName the internal name being used * @param humanReadable if the returned name should be in human-readable * form, rather than a form suitable for a * {@link Class#forName} call -- the difference * lies in the handling of arrays */ public String getExternalForm(String internalName, boolean humanReadable) { if (internalName == null || internalName.length() == 0) return internalName; Map cache = (humanReadable) ? _externalHuman : _external; String cached = (String) cache.get(internalName); if (cached != null) return cached; String ret = getExternalFormInternal(internalName, humanReadable); cache.put(internalName, ret); return ret; }
/** * Given the internal name of the class, return the 'normal' java name. * * @param internalName the internal name being used * @param humanReadable if the returned name should be in human-readable * form, rather than a form suitable for a * {@link Class#forName} call -- the difference * lies in the handling of arrays */ public String getExternalForm(String internalName, boolean humanReadable) { if (internalName == null || internalName.length() == 0) return internalName; Map cache = (humanReadable) ? _externalHuman : _external; String cached = (String) cache.get(internalName); if (cached != null) return cached; String ret = getExternalFormInternal(internalName, humanReadable); cache.put(internalName, ret); return ret; }