package cd.casic.plugin.core.register.filter.impl;


import cd.casic.plugin.annotation.PluginConfiguration;
import cd.casic.plugin.core.BasePlugin;
import cd.casic.plugin.core.register.filter.PluginClassFilter;


public class PluginConfigurationFilter implements PluginClassFilter {
    public static final String GROUP_NAME = "plugin_config";

    @Override
    public String groupName() {
        return GROUP_NAME;
    }

    @Override
    public void initialize() {

    }

    @Override
    public boolean filter(Class<?> clazz) {
        if (BasePlugin.class.isAssignableFrom(clazz)) {
            return false;
        }
        return clazz.isAnnotationPresent(PluginConfiguration.class);
    }
}
