code: public <T extends I_CmsAppSettings> T getAppSettings(CmsObject cms, Class<T> type)
      throws InstantiationException, IllegalAccessException {
  
          CmsUser user = cms.getRequestContext().getCurrentUser();
          CmsUserSettings settings = new CmsUserSettings(user);
          String settingsString = settings.getAdditionalPreference(type.getName(), true);
          T result = type.newInstance();
  
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(settingsString)) {
  
              result.restoreSettings(settingsString);
  
          }
  
          return result;
      }
docs: Returns the user app setting of the given type.<p>
  
  @param cms the cms context
  @param type the app setting type
  
  @return the app setting
  
  @throws InstantiationException in case instantiating the settings type fails
  @throws IllegalAccessException in case the settings default constructor is not accessible