Examples of ConfigurationImpl


Examples of ca.nengo.config.impl.ConfigurationImpl

 
  /**
   * @return Custom Configuration (to more cleanly handle properties in 1D)
   */
  public Configuration getConfiguration() {
    ConfigurationImpl result = ConfigUtil.defaultConfiguration(this);
    result.removeProperty("units");
    result.removeProperty("units1D");
    result.removeProperty("values");
    result.removeProperty("values1D");
    result.removeProperty("labels");
   
    try {
      Method unitsGetter = this.getClass().getMethod("getUnits1D", new Class[0]);
      Method unitsSetter = this.getClass().getMethod("setUnits", new Class[]{Units.class});
      result.defineProperty(new SingleValuedPropertyImpl(result, "units", Units.class, unitsGetter, unitsSetter));
     
      Method valuesGetter = this.getClass().getMethod("getValues1D", new Class[0]);
      result.defineProperty(new SingleValuedPropertyImpl(result, "values", float[].class, valuesGetter));

      final Method labelGetter = this.getClass().getMethod("getLabels", new Class[0]);
      Method labelSetter = this.getClass().getMethod("setLabel", new Class[]{String.class});
      SingleValuedProperty labelProp = new SingleValuedPropertyImpl(result, "label", String.class, labelGetter, labelSetter) {

        @Override
        public Object getValue() {
          Object result = null;
          try {
            Object configurable = getConfiguration().getConfigurable();
            String[] labels = (String[]) labelGetter.invoke(configurable, new Object[0]);
            result = labels[0];
          } catch (Exception e) {
            throw new RuntimeException("Can't get label value", e);
          }
          return result;
        }
       
      };
      result.defineProperty(labelProp);
    } catch (SecurityException e) {
      throw new RuntimeException("Can't access getter/setter -- this is a bug", e);
    } catch (NoSuchMethodException e) {
      throw new RuntimeException("Can't access getter/setter -- this is a bug", e);
    }
View Full Code Here

Examples of com.em.validation.client.ConfigurationImpl

public class ValidationProviderImpl implements ValidationProvider<AbstractConfiguration>{

  @Override
  public AbstractConfiguration createSpecializedConfiguration(BootstrapState state) {
    return new ConfigurationImpl();
  }
View Full Code Here

Examples of com.fathomdb.config.ConfigurationImpl

  }

  @Override
  public void connect() throws Exception {
    Properties properties = options.getConfigurationProperties();
    ConfigurationImpl configuration = ConfigurationImpl.from(new File("."), properties);

    List<Module> modules = Lists.newArrayList();

    modules.add(new ConfigurationModule(configuration));
    modules.add(new KeystoneJdbcModule());
View Full Code Here

Examples of com.fathomdb.config.ConfigurationImpl

    try {
      // Force GMT
      TimeZone.setDefault(TimeZone.getTimeZone("UTC"));

      Discovery discovery = Discovery.build();
      ConfigurationImpl configuration = ConfigurationImpl.load();

      Extensions extensions = new Extensions(configuration, discovery);

      List<Module> modules = Lists.newArrayList();
      modules.add(new NullMetricsModule());
View Full Code Here

Examples of com.fathomdb.config.ConfigurationImpl

  @Override
  protected void configure() {
    super.configure();

    ConfigurationImpl configuration = getConfiguration();

    // TODO: Do we really need this??
    // configuration.bindProperties(binder());

    bindListener(Matchers.any(), new ConfigurationTypeListener(configuration));
View Full Code Here

Examples of com.fathomdb.config.ConfigurationImpl

    ConfigurationModule configurationModule = new ConfigurationModule();
    modules.add(configurationModule);

    Discovery discovery = Discovery.build();

    ConfigurationImpl configuration = configurationModule.getConfiguration();
    Extensions extensions = new Extensions(configuration, discovery);

    modules.add(new CacheModule());
    modules.add(new GuiceAuthenticationConfig());
    modules.add(new KeystoneJdbcModule());
View Full Code Here

Examples of com.sun.enterprise.repository.ConfigurationImpl

            // ne.printStackTrace(System.err);
// START OF IASRI 4660742
            // _logger.log(Level.WARNING,"enterprise.error_connecting",ne);
// END OF IASRI 4660742
            try{
                config = new ConfigurationImpl();
    /* not needed for local copy
    javax.rmi.PortableRemoteObject.exportObject(config);
    if(ORBManager.getORB() != null) {
        Tie servantsTie = javax.rmi.CORBA.Util.getTie(config);
        servantsTie.orb(ORBManager.getORB());
View Full Code Here

Examples of com.volantis.osgi.cm.ConfigurationImpl

                .remove(FrameworkConstants.SERVICE_FACTORYPID);

        CaseInsensitiveDictionary dictionary =
                new CaseInsensitiveDictionary(properties);

        return new ConfigurationImpl(pid, factoryPid, file, bundleLocation,
                dictionary);
    }
View Full Code Here

Examples of net.raymanoz.config.ConfigurationImpl

  private void registerCommands(CmdLineArgumentsAndSwitches cmdln) {

    Properties uMigrateProperties = uMigrateProperties(cmdln);
    ApplicationProperties applicationProperties = new ApplicationPropertiesImpl(uMigrateProperties);
    FileUtil fileUtil = new FileUtilImpl(new StreamUtilImpl());
    ConfigurationImpl configuration = new ConfigurationImpl(applicationProperties, fileUtil, uMigrateProperties);
    ConditionHandlerListAssembler.setupConditions(configuration);
    CommandAssemblerImpl commandAssembler = new CommandAssemblerImpl(configuration);
    PlainProperties properties = new PlainProperties();
    ScriptCreator creator = new ScriptCreatorImpl(new ScriptCreatorAssemblerImpl(configuration), configuration, properties);
   
View Full Code Here

Examples of no.priv.garshol.duke.ConfigurationImpl

    csv.setInputFile(outfile.getAbsolutePath());
    csv.addColumn(new Column("id", null, null, null));
    csv.addColumn(new Column("name", null, null, null));
    csv.addColumn(new Column("age", null, null, null));

    ConfigurationImpl cfg = new ConfigurationImpl();
    cfg.addDatabase(new InMemoryDatabase());
    cfg.addDataSource(0, csv);

    Comparator cmp = new ExactComparator();

    List<Property> props = new ArrayList();
    props.add(new PropertyImpl("id"));
    props.add(new PropertyImpl("name", cmp, 0.0, 1.0));
    props.add(new PropertyImpl("age", cmp, 0.0, 1.0));

    cfg.setProperties(props);

    GeneticAlgorithm gen = new GeneticAlgorithm(cfg, tstfile.getAbsolutePath(),
                                                true);
    gen.setQuiet(true);
    gen.run(); // should not crash!
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.