test_class.declarator: BOOLEAN_PARAM = new ParameterInfo() {
  		
  		@Override
  		public Object[] makeChoices() {
  			return null;
  		}
  		
  		@Override
  		public String getName() {
  			return null;
  		}
  		
  		@Override
  		public ParameterLevel getLevel() {
  			return null;
  		}
  		
  		@Override
  		public String getId() {
  			return "bool";
  		}
  		
  		@Override
  		public String getDescription() {
  			return null;
  		}
  		
  		@Override
  		public Object getDefaultValue() {
  			return true;
  		}
  		
  		@Override
  		public String getCategory() {
  			return null;
  		}
  		
  		@Override
  		public String convertToString(Object val) {
  			return String.valueOf(val);
  		}
  		
  		@Override
  		public Object convertFromString(String val) {
  			return new Boolean(val);
  		}
  	}
test_class.modifier: private static final
test_class.original_string: private static final ParameterInfo BOOLEAN_PARAM = new ParameterInfo() {
  		
  		@Override
  		public Object[] makeChoices() {
  			return null;
  		}
  		
  		@Override
  		public String getName() {
  			return null;
  		}
  		
  		@Override
  		public ParameterLevel getLevel() {
  			return null;
  		}
  		
  		@Override
  		public String getId() {
  			return "bool";
  		}
  		
  		@Override
  		public String getDescription() {
  			return null;
  		}
  		
  		@Override
  		public Object getDefaultValue() {
  			return true;
  		}
  		
  		@Override
  		public String getCategory() {
  			return null;
  		}
  		
  		@Override
  		public String convertToString(Object val) {
  			return String.valueOf(val);
  		}
  		
  		@Override
  		public Object convertFromString(String val) {
  			return new Boolean(val);
  		}
  	};
test_class.type: ParameterInfo
test_class.var_name: BOOLEAN_PARAM
test_class.declarator: INTEGER_PARAM = new ParameterInfo() {
  		
  		@Override
  		public Object[] makeChoices() {
  			return null;
  		}
  		
  		@Override
  		public String getName() {
  			return null;
  		}
  		
  		@Override
  		public ParameterLevel getLevel() {
  			return null;
  		}
  		
  		@Override
  		public String getId() {
  			return "int";
  		}
  		
  		@Override
  		public String getDescription() {
  			return null;
  		}
  		
  		@Override
  		public Object getDefaultValue() {
  			return 5;
  		}
  		
  		@Override
  		public String getCategory() {
  			return null;
  		}
  		
  		@Override
  		public String convertToString(Object val) {
  			return String.valueOf(val);
  		}
  		
  		@Override
  		public Object convertFromString(String val) {
  			return new Integer(val);
  		}
  	}
test_class.modifier: private static final
test_class.original_string: private static final ParameterInfo INTEGER_PARAM = new ParameterInfo() {
  		
  		@Override
  		public Object[] makeChoices() {
  			return null;
  		}
  		
  		@Override
  		public String getName() {
  			return null;
  		}
  		
  		@Override
  		public ParameterLevel getLevel() {
  			return null;
  		}
  		
  		@Override
  		public String getId() {
  			return "int";
  		}
  		
  		@Override
  		public String getDescription() {
  			return null;
  		}
  		
  		@Override
  		public Object getDefaultValue() {
  			return 5;
  		}
  		
  		@Override
  		public String getCategory() {
  			return null;
  		}
  		
  		@Override
  		public String convertToString(Object val) {
  			return String.valueOf(val);
  		}
  		
  		@Override
  		public Object convertFromString(String val) {
  			return new Integer(val);
  		}
  	};
test_class.type: ParameterInfo
test_class.var_name: INTEGER_PARAM
test_class.declarator: FLOAT_PARAM = new ParameterInfo() {
  		
  		@Override
  		public Object[] makeChoices() {
  			return null;
  		}
  		
  		@Override
  		public String getName() {
  			return null;
  		}
  		
  		@Override
  		public ParameterLevel getLevel() {
  			return null;
  		}
  		
  		@Override
  		public String getId() {
  			return "float";
  		}
  		
  		@Override
  		public String getDescription() {
  			return null;
  		}
  		
  		@Override
  		public Object getDefaultValue() {
  			return 0.5f;
  		}
  		
  		@Override
  		public String getCategory() {
  			return null;
  		}
  		
  		@Override
  		public String convertToString(Object val) {
  			return String.valueOf(val);
  		}
  		
  		@Override
  		public Object convertFromString(String val) {
  			return new Float(val);
  		}
  	}
test_class.modifier: private static final
test_class.original_string: private static final ParameterInfo FLOAT_PARAM = new ParameterInfo() {
  		
  		@Override
  		public Object[] makeChoices() {
  			return null;
  		}
  		
  		@Override
  		public String getName() {
  			return null;
  		}
  		
  		@Override
  		public ParameterLevel getLevel() {
  			return null;
  		}
  		
  		@Override
  		public String getId() {
  			return "float";
  		}
  		
  		@Override
  		public String getDescription() {
  			return null;
  		}
  		
  		@Override
  		public Object getDefaultValue() {
  			return 0.5f;
  		}
  		
  		@Override
  		public String getCategory() {
  			return null;
  		}
  		
  		@Override
  		public String convertToString(Object val) {
  			return String.valueOf(val);
  		}
  		
  		@Override
  		public Object convertFromString(String val) {
  			return new Float(val);
  		}
  	};
test_class.type: ParameterInfo
test_class.var_name: FLOAT_PARAM
test_class.declarator: f = new Parameter(FLOAT_PARAM)
test_class.original_string: Parameter f = new Parameter(FLOAT_PARAM);
test_class.type: Parameter
test_class.var_name: f
test_class.declarator: i = new Parameter(INTEGER_PARAM)
test_class.original_string: Parameter i = new Parameter(INTEGER_PARAM);
test_class.type: Parameter
test_class.var_name: i
test_class.declarator: b = new Parameter(BOOLEAN_PARAM)
test_class.original_string: Parameter b = new Parameter(BOOLEAN_PARAM);
test_class.type: Parameter
test_class.var_name: b
test_class.declarator: ps
test_class.modifier: private
test_class.original_string: private ParameterService ps;
test_class.type: ParameterService
test_class.var_name: ps
test_class.declarator: bus = new RoboStrokeEventBus()
test_class.modifier: private final
test_class.original_string: private final RoboStrokeEventBus bus = new RoboStrokeEventBus();
test_class.type: RoboStrokeEventBus
test_class.var_name: bus
test_class.declarator: listenerRegistration = {
  			new ParameterListenerRegistration("float", new ParameterChangeListener() {
  				
  				@Override
  				public void onParameterChanged(Parameter param) {
  				}
  			}),
  			new ParameterListenerRegistration("int", new ParameterChangeListener() {
  				
  				@Override
  				public void onParameterChanged(Parameter param) {
  					intVal = (Integer)param.getValue();					
  				}
  			}),
  			new ParameterListenerRegistration("bool", new ParameterChangeListener() {
  				
  				@Override
  				public void onParameterChanged(Parameter param) {
  				}
  			})
  	}
test_class.modifier: private final
test_class.original_string: private final ParameterListenerRegistration[] listenerRegistration = {
  			new ParameterListenerRegistration("float", new ParameterChangeListener() {
  				
  				@Override
  				public void onParameterChanged(Parameter param) {
  				}
  			}),
  			new ParameterListenerRegistration("int", new ParameterChangeListener() {
  				
  				@Override
  				public void onParameterChanged(Parameter param) {
  					intVal = (Integer)param.getValue();					
  				}
  			}),
  			new ParameterListenerRegistration("bool", new ParameterChangeListener() {
  				
  				@Override
  				public void onParameterChanged(Parameter param) {
  				}
  			})
  	};
test_class.type: ParameterListenerRegistration[]
test_class.var_name: listenerRegistration
test_class.declarator: intVal = -1
test_class.modifier: private
test_class.original_string: private int intVal = -1;
test_class.type: int
test_class.var_name: intVal
test_class.file: common/src/test/java/org/nargila/robostroke/param/ParameterServiceTest.java
test_class.identifier: ParameterServiceTest
test_case.body: @Test
  	public void testSetParam() {
  		assertEquals(.5f, (Float)f.getDefaultValue(), 0);
  		ps.setParam("float", "0.7");
  		assertEquals(.7f, (Float)f.getValue(), 0);
  		ps.setParam(f, 0.8f);
  		assertEquals(.8f, (Float)f.getValue(), 0);		
  	}
test_case.class_method_signature: ParameterServiceTest.testSetParam()
test_case.full_signature: @Test public void testSetParam()
test_case.identifier: testSetParam
test_case.invocations: assertEquals getDefaultValue setParam assertEquals getValue setParam assertEquals getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetParam()
focal_class.declarator: logger = LoggerFactory.getLogger(ParameterService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ParameterService.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: eventBus
focal_class.modifier: private final
focal_class.original_string: private final RoboStrokeEventBus eventBus;
focal_class.type: RoboStrokeEventBus
focal_class.var_name: eventBus
focal_class.declarator: listeners = new HashMap<String, HashSet<ParameterChangeListener>>()
focal_class.modifier: private final
focal_class.original_string: private final HashMap<String,HashSet<ParameterChangeListener>> listeners = new HashMap<String, HashSet<ParameterChangeListener>>();
focal_class.type: HashMap<String,HashSet<ParameterChangeListener>>
focal_class.var_name: listeners
focal_class.declarator: paramMap = new HashMap<String, Parameter>()
focal_class.modifier: private final
focal_class.original_string: private final HashMap<String, Parameter> paramMap = new HashMap<String, Parameter>();
focal_class.type: HashMap<String, Parameter>
focal_class.var_name: paramMap
focal_class.declarator: recursionOn
focal_class.modifier: private
focal_class.original_string: private boolean recursionOn;
focal_class.type: boolean
focal_class.var_name: recursionOn
focal_class.file: common/src/main/java/org/nargila/robostroke/param/ParameterService.java
focal_class.identifier: ParameterService
focal_class.class_method_signature: ParameterService.ParameterService(RoboStrokeEventBus bus)
focal_class.full_signature: public  ParameterService(RoboStrokeEventBus bus)
focal_class.identifier: ParameterService
focal_class.modifiers: public
focal_class.parameters: (RoboStrokeEventBus bus)
focal_class.signature:  ParameterService(RoboStrokeEventBus bus)
focal_class.class_method_signature: ParameterService.addListener(ParameterListenerRegistration ...value)
focal_class.full_signature: public synchronized void addListener(ParameterListenerRegistration ...value)
focal_class.identifier: addListener
focal_class.modifiers: public synchronized
focal_class.parameters: (ParameterListenerRegistration ...value)
focal_class.return: void
focal_class.signature: void addListener(ParameterListenerRegistration ...value)
focal_class.class_method_signature: ParameterService.removeListener(ParameterListenerRegistration ...value)
focal_class.full_signature: public synchronized void removeListener(ParameterListenerRegistration ...value)
focal_class.identifier: removeListener
focal_class.modifiers: public synchronized
focal_class.parameters: (ParameterListenerRegistration ...value)
focal_class.return: void
focal_class.signature: void removeListener(ParameterListenerRegistration ...value)
focal_class.class_method_signature: ParameterService.addListeners(ParameterListenerOwner listenersOwner)
focal_class.full_signature: public void addListeners(ParameterListenerOwner listenersOwner)
focal_class.identifier: addListeners
focal_class.modifiers: public
focal_class.parameters: (ParameterListenerOwner listenersOwner)
focal_class.return: void
focal_class.signature: void addListeners(ParameterListenerOwner listenersOwner)
focal_class.class_method_signature: ParameterService.removeListeners(ParameterListenerOwner listenersOwner)
focal_class.full_signature: public void removeListeners(ParameterListenerOwner listenersOwner)
focal_class.identifier: removeListeners
focal_class.modifiers: public
focal_class.parameters: (ParameterListenerOwner listenersOwner)
focal_class.return: void
focal_class.signature: void removeListeners(ParameterListenerOwner listenersOwner)
focal_class.class_method_signature: ParameterService.removeListener(String paramId, ParameterChangeListener listener)
focal_class.full_signature: public synchronized void removeListener(String paramId, ParameterChangeListener listener)
focal_class.identifier: removeListener
focal_class.modifiers: public synchronized
focal_class.parameters: (String paramId, ParameterChangeListener listener)
focal_class.return: void
focal_class.signature: void removeListener(String paramId, ParameterChangeListener listener)
focal_class.class_method_signature: ParameterService.addListener(String paramId, ParameterChangeListener listener)
focal_class.full_signature: public synchronized void addListener(String paramId, ParameterChangeListener listener)
focal_class.identifier: addListener
focal_class.modifiers: public synchronized
focal_class.parameters: (String paramId, ParameterChangeListener listener)
focal_class.return: void
focal_class.signature: void addListener(String paramId, ParameterChangeListener listener)
focal_class.class_method_signature: ParameterService.registerParam(Parameter ... param)
focal_class.full_signature: public synchronized void registerParam(Parameter ... param)
focal_class.identifier: registerParam
focal_class.modifiers: public synchronized
focal_class.parameters: (Parameter ... param)
focal_class.return: void
focal_class.signature: void registerParam(Parameter ... param)
focal_class.class_method_signature: ParameterService.setParam(Parameter param, Object value)
focal_class.full_signature: public synchronized void setParam(Parameter param, Object value)
focal_class.identifier: setParam
focal_class.modifiers: public synchronized
focal_class.parameters: (Parameter param, Object value)
focal_class.return: void
focal_class.signature: void setParam(Parameter param, Object value)
focal_class.class_method_signature: ParameterService.onParamChanged(Parameter param)
focal_class.full_signature: private void onParamChanged(Parameter param)
focal_class.identifier: onParamChanged
focal_class.modifiers: private
focal_class.parameters: (Parameter param)
focal_class.return: void
focal_class.signature: void onParamChanged(Parameter param)
focal_class.class_method_signature: ParameterService.setParam(String id, Object value)
focal_class.full_signature: public synchronized void setParam(String id, Object value)
focal_class.identifier: setParam
focal_class.modifiers: public synchronized
focal_class.parameters: (String id, Object value)
focal_class.return: void
focal_class.signature: void setParam(String id, Object value)
focal_class.class_method_signature: ParameterService.getValue(String id)
focal_class.full_signature: @SuppressWarnings("unchecked") public T getValue(String id)
focal_class.identifier: getValue
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (String id)
focal_class.return: T
focal_class.signature: T getValue(String id)
focal_class.class_method_signature: ParameterService.getParamMap()
focal_class.full_signature: public Map<String, Parameter> getParamMap()
focal_class.identifier: getParamMap
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, Parameter>
focal_class.signature: Map<String, Parameter> getParamMap()
focal_class.class_method_signature: ParameterService.getParam(String id)
focal_class.full_signature: public synchronized Parameter getParam(String id)
focal_class.identifier: getParam
focal_class.modifiers: public synchronized
focal_class.parameters: (String id)
focal_class.return: Parameter
focal_class.signature: Parameter getParam(String id)
focal_method.body: public synchronized void setParam(Parameter param, Object value) {
  		
  		// check either param is registered
  		if (getParam(param.getId()) != param) {
  			throw new IllegalArgumentException(String.format("parameter provided with id %s is not the same as the registered one"));
  		}
  		
  		try {
  			if (recursionOn) {
  				throw new IllegalStateException("recursion detected - parameter listeners are not allowed to modify parameters from within same thread");
  			}
  			
  			recursionOn = true;
  			
  			if (param.setParameterValue(value)) {
  				onParamChanged(param);
  			}
  		} finally {
  			recursionOn = false;
  		}
  	}
focal_method.class_method_signature: ParameterService.setParam(Parameter param, Object value)
focal_method.full_signature: public synchronized void setParam(Parameter param, Object value)
focal_method.identifier: setParam
focal_method.invocations: getParam getId format setParameterValue onParamChanged
focal_method.modifiers: public synchronized
focal_method.parameters: (Parameter param, Object value)
focal_method.return: void
focal_method.signature: void setParam(Parameter param, Object value)