@Override public String getString(TransferPlugin plugin) { return plugin.getId(); } });
private String findPluginId() { Class<? extends TransferPlugin> transferPluginClass = TransferPluginUtil.getTransferPluginClass(this.getClass()); try { if (transferPluginClass != null) { return transferPluginClass.newInstance().getId(); } throw new RuntimeException("Unable to read type: No TransferPlugin is defined for these settings"); } catch (Exception e) { logger.log(Level.SEVERE, "Unable to read type: No TransferPlugin is defined for these settings", e); throw new RuntimeException("Unable to read type: No TransferPlugin is defined for these settings", e); } }