jodd-joy/src/main/java/jodd/joy/JoyScanner.java
@Override
	public void start() {
		initLogger();

		log.info("SCANNER start ----------");

		classScanner = new ClassScanner() {
			@Override
			protected void scanJarFile(final File file) {
				log.debug("Scanning jar: " + file);
				super.scanJarFile(file);
			}

			@Override
			protected void scanClassPath(final File root) {
				log.debug("Scanning path: " + root);
				super.scanClassPath(root);
			}
		};

		if (log.isDebugEnabled()) {
			log.debug("Scan entries: " + Converter.get().toString(includedEntries));
			log.debug("Scan jars: " + Converter.get().toString(includedJars));
			log.debug("Scan exclude jars: " + Converter.get().toString(excludedJars));
			log.debug("Scan ignore exception: " + ignoreExceptions);
		}

		classScanner.excludeCommonEntries();
		classScanner.excludeCommonJars();
		classScanner.excludeJars(excludedJars.toArray(new String[0]));

		if (includedEntries.isEmpty() && includedJars.isEmpty()) {
			// nothing was explicitly included
			classScanner.excludeAllEntries(false);
		}
		else {
			// something was included by user
			classScanner.excludeAllEntries(true);
			includedEntries.add("jodd.*");
		}

		classScanner
			.detectEntriesMode(true)
			.includeEntries(includedEntries.toArray(new String[0]))
			.includeJars(includedJars.toArray(new String[0]))
			.ignoreException(ignoreExceptions)
			.scanDefaultClasspath();

		appClasses.forEach(clazz -> classScanner.scan(ClassPathURLs.of(null, clazz)));

		log.info("SCANNER OK!");
	}
@Override
	public void start() {
		initLogger();

		log.info("SCANNER start ----------");

		classScanner = new ClassScanner() {
			@Override
			protected void scanJarFile(final File file) {
				log.debug("Scanning jar: " + file);
				super.scanJarFile(file);
			}

			@Override
			protected void scanClassPath(final File root) {
				log.debug("Scanning path: " + root);
				super.scanClassPath(root);
			}
		};

		if (log.isDebugEnabled()) {
			log.debug("Scan entries: " + Converter.get().toString(includedEntries));
			log.debug("Scan jars: " + Converter.get().toString(includedJars));
			log.debug("Scan exclude jars: " + Converter.get().toString(excludedJars));
			log.debug("Scan ignore exception: " + ignoreExceptions);
		}

		classScanner.excludeCommonEntries();
		classScanner.excludeCommonJars();
		classScanner.excludeJars(excludedJars.toArray(new String[0]));

		if (includedEntries.isEmpty() && includedJars.isEmpty()) {
			// nothing was explicitly included
			classScanner.excludeAllEntries(false);
		}
		else {
			// something was included by user
			classScanner.excludeAllEntries(true);
			includedEntries.add("jodd.*");
		}

		classScanner
			.detectEntriesMode(true)
			.includeEntries(includedEntries.toArray(new String[0]))
			.includeJars(includedJars.toArray(new String[0]))
			.ignoreException(ignoreExceptions)
			.scanDefaultClasspath();

		appClasses.forEach(clazz -> classScanner.scan(ClassPathURLs.of(null, clazz)));

		log.info("SCANNER OK!");
	}
@ Override public void start ( ) { initLogger ( ) ; log . info ( "SCANNER start ----------" ) ; classScanner = new ClassScanner ( ) { @ Override protected void scanJarFile ( final File file ) { log . debug ( "Scanning jar: " + file ) ; super . scanJarFile ( file ) ; } @ Override protected void scanClassPath ( final File root ) { log . debug ( "Scanning path: " + root ) ; super . scanClassPath ( root ) ; } } ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Scan entries: " + Converter . get ( ) . toString ( includedEntries ) ) ; log . debug ( "Scan jars: " + Converter . get ( ) . toString ( includedJars ) ) ; log . debug ( "Scan exclude jars: " + Converter . get ( ) . toString ( excludedJars ) ) ; log . debug ( "Scan ignore exception: " + ignoreExceptions ) ; } classScanner . excludeCommonEntries ( ) ; classScanner . excludeCommonJars ( ) ; classScanner . excludeJars ( excludedJars . toArray ( new String [ 0 ] ) ) ; if ( includedEntries . isEmpty ( ) && includedJars . isEmpty ( ) ) { // nothing was explicitly included classScanner . excludeAllEntries ( false ) ; } else { // something was included by user classScanner . excludeAllEntries ( true ) ; includedEntries . add ( "jodd.*" ) ; } classScanner . detectEntriesMode ( true ) . includeEntries ( includedEntries . toArray ( new String [ 0 ] ) ) . includeJars ( includedJars . toArray ( new String [ 0 ] ) ) . ignoreException ( ignoreExceptions ) . scanDefaultClasspath ( ) ; appClasses . forEach ( clazz -> classScanner . scan ( ClassPathURLs . of ( null , clazz ) ) ) ; log . info ( "SCANNER OK!" ) ; }
Configures scanner class finder. Works for all three scanners:
Petite, DbOom and Madvoc. All scanners by default include all jars,
but exclude all entries.
Configures scanner class finder . Works for all three scanners : Petite DbOom and Madvoc . All scanners by default include all jars but exclude all entries .