All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.fortnox.reactivewizard.binding.scanners.DaoClassScanner Maven / Gradle / Ivy

There is a newer version: 24.6.0
Show newest version
package se.fortnox.reactivewizard.binding.scanners;

import jakarta.inject.Singleton;
import se.fortnox.reactivewizard.db.Query;
import se.fortnox.reactivewizard.db.Update;

@Singleton
public class DaoClassScanner extends AbstractClassScanner {
    @Override
    public void visit(ClassScanner classScanner) {
        classScanner.findClassesWithMethodAnnotation(Query.class).forEach(this::addIfInterface);
        classScanner.findClassesWithMethodAnnotation(Update.class).forEach(this::addIfInterface);
    }

    private void addIfInterface(Class cls) {
        if (cls.isInterface()) {
            this.add(cls);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy