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


import cd.casic.plugin.core.register.filter.PluginClassFilter;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

public class MapperFilter implements PluginClassFilter {
    public static final String GROUP_NAME = "mapper";

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

    @Override
    public void initialize() {

    }

    @Override
    public boolean filter(Class<?> clazz) {
        return clazz.isAnnotationPresent(Mapper.class) || clazz.isAnnotationPresent(Repository.class);
    }
}
