Search in sources :

Example 1 with EzyPackagesToScanProvider

use of com.tvd12.ezyfox.bean.EzyPackagesToScanProvider in project ezyhttp by youngmonkeys.

the class ApplicationContextBuilder method getPackagesToScanFromProviders.

private Set<String> getPackagesToScanFromProviders(EzyReflection reflection) {
    Set<String> answer = new HashSet<>();
    Set<Class<?>> providerClasses = reflection.getExtendsClasses(EzyPackagesToScanProvider.class);
    for (Class<?> clazz : providerClasses) {
        EzyPackagesToScanProvider provider = (EzyPackagesToScanProvider) EzyClasses.newInstance(clazz);
        answer.addAll(provider.provide());
    }
    return answer;
}
Also used : EzyPackagesToScanProvider(com.tvd12.ezyfox.bean.EzyPackagesToScanProvider) HashSet(java.util.HashSet)

Aggregations

EzyPackagesToScanProvider (com.tvd12.ezyfox.bean.EzyPackagesToScanProvider)1 HashSet (java.util.HashSet)1