code: public <T extends SimonConsolePlugin> void addPlugin(Class<T> pluginType) {
  		try {
  			SimonConsolePlugin plugin = pluginType.newInstance();
  			addPlugin(plugin);
  		} catch (InstantiationException | IllegalAccessException instantiationException) {
  			throw new IllegalArgumentException("Invalid plugin type " + pluginType.getName(), instantiationException);
  		}
  	}
docs: Register a plugin
  
  @param pluginType Plugin type