Package ca.nengo.config.impl

Examples of ca.nengo.config.impl.SingleValuedPropertyImpl


    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 {
View Full Code Here


  private void initConfiguration() {
    myConfiguration = ConfigUtil.defaultConfiguration(this);
    myConfiguration.removeProperty("dimensions");
    try {
      Property p = new SingleValuedPropertyImpl(myConfiguration, "dimensions", Integer.TYPE,
          this.getClass().getMethod("getDimensions", new Class[0]));
      myConfiguration.defineProperty(p);
    } catch (Exception e) {
      ourLogger.warn("Can't define property 'dimensions'", e);
    }
View Full Code Here

TOP

Related Classes of ca.nengo.config.impl.SingleValuedPropertyImpl

Copyright © 2018 www.massapicom. 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.