@Override public JoyScanner setIgnoreExceptions(final boolean ignoreExceptions) { requireNotStarted(classScanner); this.ignoreExceptions = ignoreExceptions; return this; }
/** * Returns class scanner. */ public ClassScanner getClassScanner() { return requireStarted(classScanner); }
/** * Shortcut for {@link #scanClasspathOf(Class)}. */ @Override public JoyScanner scanClasspathOf(final Object applicationObject) { requireNotStarted(classScanner); return scanClasspathOf(applicationObject.getClass()); }
new AutomagicMadvocConfigurator(joyScannerSupplier.get().getClassScanner()) { @Override protected String createInfoMessage() {
public JoddJoy() { appName = "joy"; joyPaths = new JoyPaths(); joyPaths.start(); joyScanner = new JoyScanner(); joyProps = new JoyProps(() -> appName); joyProxetta = new JoyProxetta(); joyPetite = new JoyPetite( () -> appName, () -> joyProxetta, () -> joyProps, () -> joyScanner ); joyDb = new JoyDb( () -> appName, () -> joyPetite, () -> joyProxetta, () -> joyScanner); joyMadvoc = new JoyMadvoc( () -> appName, () -> joyPetite, () -> joyProxetta, () -> joyProps, () -> joyScanner ); }
/** * Creates and initializes Petite container. * It will be auto-magically configured by scanning the classpath. */ @Override public void start() { initLogger(); log.info("PETITE start ----------"); petiteContainer = createPetiteContainer(); if (externalsCache) { petiteContainer.setExternalsCache(TypeCache.createDefault()); } log.info("Web application? " + isWebApplication); if (!isWebApplication) { // make session scope to act as singleton scope // if this is not a web application (and http session is not available). petiteContainer.registerScope(SessionScope.class, new SingletonScope(petiteContainer)); } // load parameters from properties files petiteContainer.defineParameters(joyPropsSupplier.get().getProps()); // automagic configuration if (autoConfiguration) { final AutomagicPetiteConfigurator automagicPetiteConfigurator = new AutomagicPetiteConfigurator(petiteContainer); automagicPetiteConfigurator.registerAsConsumer(joyScannerSupplier.get().getClassScanner()); } petiteContainerConsumers.accept(this.petiteContainer); log.info("PETITE OK!"); }
public JoddJoy() { appName = "joy"; joyPaths = new JoyPaths(); joyPaths.start(); joyScanner = new JoyScanner(); joyProps = new JoyProps(() -> appName); joyProxetta = new JoyProxetta(); joyPetite = new JoyPetite( () -> appName, () -> joyProxetta, () -> joyProps, () -> joyScanner ); joyDb = new JoyDb( () -> appName, () -> joyPetite, () -> joyProxetta, () -> joyScanner); joyMadvoc = new JoyMadvoc( () -> appName, () -> joyPetite, () -> joyProxetta, () -> joyProps, () -> joyScanner ); }
@Override public JoyScanner setIncludedJars(final String... includedJars) { requireNotStarted(classScanner); Collections.addAll(this.includedJars, includedJars); return this; }
/** * Shortcut for {@link #scanClasspathOf(Class)}. */ @Override public JoyScanner scanClasspathOf(final Object applicationObject) { requireNotStarted(classScanner); return scanClasspathOf(applicationObject.getClass()); }
joyScannerSupplier.get().getClassScanner());
/** * Returns class scanner. */ public ClassScanner getClassScanner() { return requireStarted(classScanner); }
@Override public JoyScanner setExcludedJars(final String... excludedJars) { requireNotStarted(classScanner); Collections.addAll(this.excludedJars, excludedJars); return this; }
new AutomagicMadvocConfigurator(joyScannerSupplier.get().getClassScanner()) { @Override protected String createInfoMessage() {
@Override public JoyScanner setIncludedEntries(final String... includedEntries) { requireNotStarted(classScanner); Collections.addAll(this.includedEntries, includedEntries); return this; }
/** * Creates and initializes Petite container. * It will be auto-magically configured by scanning the classpath. */ @Override public void start() { initLogger(); log.info("PETITE start ----------"); petiteContainer = createPetiteContainer(); if (externalsCache) { petiteContainer.setExternalsCache(TypeCache.createDefault()); } log.info("Web application? " + isWebApplication); if (!isWebApplication) { // make session scope to act as singleton scope // if this is not a web application (and http session is not available). petiteContainer.registerScope(SessionScope.class, new SingletonScope(petiteContainer)); } // load parameters from properties files petiteContainer.defineParameters(joyPropsSupplier.get().getProps()); // automagic configuration if (autoConfiguration) { final AutomagicPetiteConfigurator automagicPetiteConfigurator = new AutomagicPetiteConfigurator(petiteContainer); automagicPetiteConfigurator.registerAsConsumer(joyScannerSupplier.get().getClassScanner()); } petiteContainerConsumers.accept(this.petiteContainer); log.info("PETITE OK!"); }
/** * Defines class and it's classloader to scan. This is not required in Java8 * and would not hurt anything if called. However, for Java9, you should * pass <i>any</i> user-application class, so Jodd can figure out the real * class path to scan. */ @Override public JoyScanner scanClasspathOf(final Class applicationClass) { requireNotStarted(classScanner); appClasses.add(applicationClass); return this; }