@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().specification(BusinessSpecifications.EXPLICIT_ASSEMBLER) .specification(BusinessSpecifications.DEFAULT_ASSEMBLER) .specification(BusinessSpecifications.DTO_INFO_RESOLVER) .specification(BusinessSpecifications.DTO_OF) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder() .specification(WSSpecifications.WEB_SERVICE_SPEC) .specification(WSSpecifications.WEB_SERVICE_CLIENT_SPEC) .specification(WSSpecifications.HANDLER_SPEC) .resourcesRegex(XSD_REGEX) .resourcesRegex(WSDL_REGEX) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder() .annotationType(WebFilter.class) .annotationType(WebServlet.class) .annotationType(WebListener.class) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return new ClasspathScanRequestBuilder() .annotationType(Entity.class) .annotationType(Embeddable.class) .specification(JpaRepositoryFactorySpecification.INSTANCE) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder() .descendentTypeOf(Realm.class) .descendentTypeOf(RoleMapping.class) .descendentTypeOf(RolePermissionResolver.class) .descendentTypeOf(Scope.class) .descendentTypeOf(PrincipalCustomizer.class) .descendentTypeOf(CrudActionResolver.class) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder() .resourcesRegex(YAML_REGEX) .resourcesRegex(YML_REGEX) .resourcesRegex(JSON_REGEX) .resourcesRegex(PROPERTIES_REGEX) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().resourcesRegex(PROPERTIES_REGEX).resourcesRegex(PROPS_REGEX).annotationType(ConfigurationLookup.class).build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder() .subtypeOf(FragmentConfigurationHandler.class) .resourcesRegex(FRAGMENTS_REGEX) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().subtypeOf(DiagnosticInfoCollector.class).annotationType(Install.class).build(); }
/** * Builds a ClasspathScanRequest to find all the descendant of the given interfaces. * * @param <T> the class of the interface. * @param classpathScanRequestBuilder the Nuun classpath scan request builder. * @param interfaces the interfaces. * @return a map where the key is an interface and the value is a specification matching * descendants of this interface. */ @SuppressWarnings("unchecked") public static <T extends Class<?>> Map<T, Specification<? extends T>> classpathRequestForDescendantTypesOf( ClasspathScanRequestBuilder classpathScanRequestBuilder, Collection<T> interfaces) { Map<T, Specification<? extends T>> specsByInterface = new HashMap<>(); for (T anInterface : interfaces) { LOGGER.trace("Request implementations of: {}", anInterface.getName()); Specification<Class<?>> spec = new SpecificationBuilder<>( classIsDescendantOf(anInterface).and(classIsInterface().negate()) .and(classModifierIs(Modifier.ABSTRACT).negate())).build(); classpathScanRequestBuilder.specification(spec); specsByInterface.put(anInterface, (Specification<? extends T>) spec); } return specsByInterface; }
@Override public void classpathScanRequests(ClasspathScanRequestBuilder classpathScanRequestBuilder) { classpathScanRequestBuilder.annotationType(SecurityFilter.class); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().descendentTypeOf(TrailWriter.class).descendentTypeOf(TrailExceptionHandler.class).build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().resourcesRegex(APPLICATION_CONTEXT_REGEX).build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().subtypeOf(FragmentConfigurationHandler.class).resourcesRegex(FRAGMENTS_REGEX).resourcesRegex(APP_CONF_REGEX).build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder() .specification(messageListenerSpec) .specification(exceptionListenerSpec) .specification(exceptionHandlerSpec) .build(); }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().annotationType(WebServlet.class).annotationType(WebFilter.class).build(); }
@SuppressWarnings("unchecked") @Override public Collection<ClasspathScanRequest> classpathScanRequests() { // Scan templateLoaders if (round.isFirst()) { return classpathScanRequestBuilder() .specification(templateLoaderSpec) .specification(rendererSpec) .specification(parserSpec) .build(); } else { // for each templateLoader with regex, parse "META-INF/templates/" directory to find corresponding templates ClasspathScanRequestBuilder classpathScanRequestBuilder = classpathScanRequestBuilder(); for (StaticTemplateLoader<?> templateLoader : templateLoaderRegexs) { classpathScanRequestBuilder.resourcesRegex(templateLoader.templatePathRegex()); } return classpathScanRequestBuilder.build(); } }