private static Meecrowave.Builder buildConfig(final CommandLine line, final List<Field> fields, final Map<Object, List<Field>> propertiesOptions) { final Meecrowave.Builder config = new Meecrowave.Builder(); bind(config, line, fields, config); propertiesOptions.forEach((o, f) -> { bind(config, line, f, o); config.setExtension(o.getClass(), o); }); return config; }
private Meecrowave.Builder getConfig() { final Meecrowave.Builder config = new Meecrowave.Builder(); for (final Field field : MeecrowaveRunMojo.class.getDeclaredFields()) { if ("properties".equals(field.getName())) { continue; } try { final Field configField = Meecrowave.Builder.class.getDeclaredField(field.getName()); field.setAccessible(true); configField.setAccessible(true); final Object value = field.get(this); if (value != null) { configField.set(config, value); getLog().debug("using " + field.getName() + " = " + value); } } catch (final NoSuchFieldException nsfe) { // ignored } catch (final Exception e) { getLog().warn("can't initialize attribute " + field.getName()); } } config.loadFrom(meecrowaveProperties); if (properties != null) { config.getProperties().putAll(properties); } return config; } }
private static Meecrowave.Builder buildConfig(final CommandLine line, final List<Field> fields, final Map<Object, List<Field>> propertiesOptions) { final Meecrowave.Builder config = new Meecrowave.Builder(); bind(config, line, fields, config); propertiesOptions.forEach((o, f) -> { bind(config, line, f, o); config.setExtension(o.getClass(), o); }); return config; }
Meecrowave.Builder toMeecrowaveConfiguration() { final Meecrowave.Builder builder = new Meecrowave.Builder(); for (final Field field : MeecrowaveConfiguration.class.getDeclaredFields()) { final String name = field.getName();
Meecrowave.Builder toMeecrowaveConfiguration() { final Meecrowave.Builder builder = new Meecrowave.Builder(); for (final Field field : MeecrowaveConfiguration.class.getDeclaredFields()) { final String name = field.getName();
public Meecrowave.Builder doBoot() { final Meecrowave.Builder configuration = new Meecrowave.Builder().randomHttpPort().noShutdownHook(/*the rule does*/); boolean unlocked = false; ClassLoaderLock.LOCK.lock();
public Meecrowave.Builder doBoot() { final Meecrowave.Builder configuration = new Meecrowave.Builder().randomHttpPort().noShutdownHook(/*the rule does*/); boolean unlocked = false; ClassLoaderLock.LOCK.lock();
@Override public void beforeAll(final ExtensionContext context) { final Meecrowave.Builder builder = new Meecrowave.Builder(); final Optional<MeecrowaveConfig> meecrowaveConfig = context.getElement().map(e -> e.getAnnotation(MeecrowaveConfig.class)); final String ctx;
@Override public void beforeAll(final ExtensionContext context) { final Meecrowave.Builder builder = new Meecrowave.Builder(); final Optional<MeecrowaveConfig> meecrowaveConfig = context.getElement().map(e -> e.getAnnotation(MeecrowaveConfig.class)); final String ctx;
public MeecrowaveRule() { this(new Meecrowave.Builder().randomHttpPort(), ""); }
public Meecrowave() { this(new Builder()); }
public Meecrowave() { this(new Builder()); }
public MeecrowaveRule() { this(new Meecrowave.Builder().randomHttpPort(), ""); }