@Test @SuppressWarnings("checkstyle:avoidhidingcauseexception") public void foreignSetTest() throws Throwable { thrown.expect(ClassHierarchyException.class); thrown.expectMessage("Unknown Impl/Param when setting RequiredImpl. " + " Did you pass in a field from some other module?"); try { MultiBindConfigurationModule.CONF.set(MyConfigurationModule.THE_FOO, FooImpl.class); } catch (final ExceptionInInitializerError e) { throw e.getCause(); } }
public final <T> ConfigurationModule set(final Impl<T> opt, final Class<? extends T> impl) { final ConfigurationModule c = deepCopy(); c.processSet(opt); if (c.builder.setOpts.contains(opt)) { c.setImplSets.put(opt, impl); } else { c.setImpls.put(opt, impl); } return c; }
ConfigurationModule { public final <T> ConfigurationModule set(final Impl<T> opt, final Class<? extends T> impl) { final ConfigurationModule c = deepCopy(); c.processSet(opt); if (c.builder.setOpts.contains(opt)) { c.setImplSets.put(opt, impl); } else { c.setImpls.put(opt, impl); } return c; } }
ConfigurationModule { public final <T> ConfigurationModule set(final Impl<T> opt, final Class<? extends T> impl) { final ConfigurationModule c = deepCopy(); c.processSet(opt); if (c.builder.setOpts.contains(opt)) { c.setImplSets.put(opt, impl); } else { c.setImpls.put(opt, impl); } return c; } protected  ConfigurationModule(final ConfigurationModuleBuilder builder); }
ConfigurationModule { public final <T> ConfigurationModule set(final Impl<T> opt, final Class<? extends T> impl) { final ConfigurationModule c = deepCopy(); c.processSet(opt); if (c.builder.setOpts.contains(opt)) { c.setImplSets.put(opt, impl); } else { c.setImpls.put(opt, impl); } return c; } protected  ConfigurationModule(final ConfigurationModuleBuilder builder); final ConfigurationModule set(final Impl<T> opt, final Class<? extends T> impl); final ConfigurationModule set(final Impl<T> opt, final String impl); final ConfigurationModule set(final Impl<List> opt, final List implList); final ConfigurationModule set(final Param<T> opt, final Class<? extends T> val); final ConfigurationModule set(final Param<Boolean> opt, final boolean val); final ConfigurationModule set(final Param<? extends Number> opt, final Number val); final ConfigurationModule set(final Param<T> opt, final String val); final ConfigurationModule setMultiple(final Param<T> opt, final Iterable<String> values); final ConfigurationModule setMultiple(final Param<T> opt, final String... values); final ConfigurationModule set(final Param<List> opt, final List implList); @SuppressWarnings({"unchecked", "rawtypes"}) Configuration build(); Set<NamedParameterNode<?>> getBoundNamedParameters(); List<Entry<String, String>> toStringPairs(); String toPrettyString(); void assertStaticClean(); ConfigurationModuleBuilder getBuilder(); }
ConfigurationModule { public final <T> ConfigurationModule set(final Impl<T> opt, final Class<? extends T> impl) { final ConfigurationModule c = deepCopy(); c.processSet(opt); if (c.builder.setOpts.contains(opt)) { c.setImplSets.put(opt, impl); } else { c.setImpls.put(opt, impl); } return c; } protected  ConfigurationModule(final ConfigurationModuleBuilder builder); final ConfigurationModule set(final Impl<T> opt, final Class<? extends T> impl); final ConfigurationModule set(final Impl<T> opt, final String impl); final ConfigurationModule set(final Impl<List> opt, final List implList); final ConfigurationModule set(final Param<T> opt, final Class<? extends T> val); final ConfigurationModule set(final Param<Boolean> opt, final boolean val); final ConfigurationModule set(final Param<? extends Number> opt, final Number val); final ConfigurationModule set(final Param<T> opt, final String val); final ConfigurationModule setMultiple(final Param<T> opt, final Iterable<String> values); final ConfigurationModule setMultiple(final Param<T> opt, final String... values); final ConfigurationModule set(final Param<List> opt, final List implList); @SuppressWarnings({"unchecked", "rawtypes"}) Configuration build(); Set<NamedParameterNode<?>> getBoundNamedParameters(); List<Entry<String, String>> toStringPairs(); String toPrettyString(); void assertStaticClean(); ConfigurationModuleBuilder getBuilder();  }