class DemoPluginFactory extends DefaultPluginFactory {

    private static final Logger log = LoggerFactory.getLogger(DemoPluginFactory.class);

    @Override
    protected Plugin createInstance(Class<?> pluginClass, PluginWrapper pluginWrapper) {<FILL_FUNCTION_BODY>}

}

        PluginContext context = new PluginContext(pluginWrapper.getRuntimeMode());
        try {
            Constructor<?> constructor = pluginClass.getConstructor(PluginContext.class);
            return (Plugin) constructor.newInstance(context);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }

        return null;
    
<methods>public non-sealed void <init>() ,public org.pf4j.Plugin create(org.pf4j.PluginWrapper) <variables>private static final org.slf4j.Logger log