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


import cd.casic.plugin.core.register.filter.PluginClassFilter;
import cd.casic.plugin.utils.AnnotationUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

public class BasicBeanFilter implements PluginClassFilter {
    public static final String GROUP_NAME = "basic_bean";

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

    @Override
    public void initialize() {

    }

    @Override
    public boolean filter(Class<?> clazz) {
        return AnnotationUtils.hasAnnotations(clazz, false, Bean.class,
                Service.class,
                Component.class,
                Configuration.class);
    }
}
