code: private static Class<?> decodeType0(
              String className,
              JodaBeanSer settings,
              String basePackage,
              Map<String, Class<?>> knownTypes,
              Class<?> defaultType) throws ClassNotFoundException {
  
          // basic type
          Class<?> result = BASIC_TYPES_REVERSED.get(className);
          if (result != null) {
              return result;
          }
          // check cache
          if (knownTypes != null) {
              result = knownTypes.get(className);
              if (result != null) {
                  return result;
              }
          }
          // calculate
          String fullName = className;
          boolean expanded = false;
          if (basePackage != null && className.length() > 0 && Character.isUpperCase(className.charAt(0))) {
              fullName = basePackage + className;
              expanded = true;
          }
          try {
              result = RenameHandler.INSTANCE.lookupType(fullName);
              if (knownTypes != null) {
                  // cache full name
                  knownTypes.put(fullName, result);
                  if (expanded) {
                      // cache short name
                      knownTypes.put(className, result);
                  } else {
                      // derive and cache short name
                      String simpleName = result.getSimpleName();
                      // handle renames
                      if (fullName.equals(result.getName()) == false &&
                              RenameHandler.INSTANCE.getTypeRenames().containsKey(fullName) &&
                              result.getEnclosingClass() == null) {
                          simpleName = fullName.substring(fullName.lastIndexOf(".") + 1);
                      }
                      if (Character.isUpperCase(simpleName.charAt(0)) &&
                              BASIC_TYPES_REVERSED.containsKey(simpleName) == false &&
                              knownTypes.containsKey(simpleName) == false) {
                          knownTypes.put(simpleName, result);
                      }
                  }
              }
              return result;
          } catch (ClassNotFoundException ex) {
              // handle pathological case of package name starting with upper case
              if (fullName.equals(className) == false) {
                  try {
                      result = RenameHandler.INSTANCE.lookupType(className);
                      if (knownTypes != null) {
                          knownTypes.put(className, result);
                      }
                      return result;
                  } catch (ClassNotFoundException ignored) {
                  }
              }
              if (defaultType == null) {
                  throw ex;
              }
              return defaultType;
          }
      }
docs: internal type decode