test_class.file: com.effectiveosgi.rt.config/src/test/java/com/effectiveosgi/rt/config/impl/ConfigurationCommandsTest.java
test_class.identifier: ConfigurationCommandsTest
test_case.body: @Test
  	public void testCompareConfigs() {
  		// factory before non-factory
  		assertEquals(1, ConfigurationCommands.compareConfigurations(createMockConfig(null, ""), createMockConfig("", ""))); 
  		assertEquals(-1, ConfigurationCommands.compareConfigurations(createMockConfig("", ""), createMockConfig(null, ""))); 
  		assertEquals(0, ConfigurationCommands.compareConfigurations(createMockConfig(null, ""), createMockConfig(null, "")));
  		
  		// compare factory first
  		assertEquals(-1, ConfigurationCommands.compareConfigurations(createMockConfig("aaa", "yyy"), createMockConfig("bbb", "xxx"))); 
  		assertEquals(1, ConfigurationCommands.compareConfigurations(createMockConfig("bbb", "xxx"), createMockConfig("aaa", "yyy")));
  		
  		// compare pid second
  		assertEquals(-1, ConfigurationCommands.compareConfigurations(createMockConfig("aaa", "xxx"), createMockConfig("aaa", "yyy")));
  		assertEquals(1, ConfigurationCommands.compareConfigurations(createMockConfig("aaa", "yyy"), createMockConfig("aaa", "xxx")));
  		assertEquals(0, ConfigurationCommands.compareConfigurations(createMockConfig("aaa", "xxx"), createMockConfig("aaa", "xxx")));
  	}
test_case.class_method_signature: ConfigurationCommandsTest.testCompareConfigs()
test_case.full_signature: @Test public void testCompareConfigs()
test_case.identifier: testCompareConfigs
test_case.invocations: assertEquals compareConfigurations createMockConfig createMockConfig assertEquals compareConfigurations createMockConfig createMockConfig assertEquals compareConfigurations createMockConfig createMockConfig assertEquals compareConfigurations createMockConfig createMockConfig assertEquals compareConfigurations createMockConfig createMockConfig assertEquals compareConfigurations createMockConfig createMockConfig assertEquals compareConfigurations createMockConfig createMockConfig assertEquals compareConfigurations createMockConfig createMockConfig
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCompareConfigs()
focal_class.declarator: configAdmin
focal_class.modifier: private final
focal_class.original_string: private final ConfigurationAdmin configAdmin;
focal_class.type: ConfigurationAdmin
focal_class.var_name: configAdmin
focal_class.declarator: UNKNOWN_TYPE_NAME = "?"
focal_class.modifier: private static final
focal_class.original_string: private static final String UNKNOWN_TYPE_NAME = "?";
focal_class.type: String
focal_class.var_name: UNKNOWN_TYPE_NAME
focal_class.file: com.effectiveosgi.rt.config/src/main/java/com/effectiveosgi/rt/config/impl/ConfigurationCommands.java
focal_class.identifier: ConfigurationCommands
focal_class.interfaces: implements Converter
focal_class.class_method_signature: ConfigurationCommands.ConfigurationCommands(ConfigurationAdmin configAdmin)
focal_class.full_signature: public  ConfigurationCommands(ConfigurationAdmin configAdmin)
focal_class.identifier: ConfigurationCommands
focal_class.modifiers: public
focal_class.parameters: (ConfigurationAdmin configAdmin)
focal_class.signature:  ConfigurationCommands(ConfigurationAdmin configAdmin)
focal_class.class_method_signature: ConfigurationCommands.list()
focal_class.full_signature: @Descriptor("List configurations") public Configuration[] list()
focal_class.identifier: list
focal_class.modifiers: @Descriptor("List configurations") public
focal_class.parameters: ()
focal_class.return: Configuration[]
focal_class.signature: Configuration[] list()
focal_class.class_method_signature: ConfigurationCommands.list(@Descriptor("PID prefix") String prefix)
focal_class.full_signature: @Descriptor("List confgurations") public Configuration[] list(@Descriptor("PID prefix") String prefix)
focal_class.identifier: list
focal_class.modifiers: @Descriptor("List confgurations") public
focal_class.parameters: (@Descriptor("PID prefix") String prefix)
focal_class.return: Configuration[]
focal_class.signature: Configuration[] list(@Descriptor("PID prefix") String prefix)
focal_class.class_method_signature: ConfigurationCommands.info(String pid)
focal_class.full_signature: public Object info(String pid)
focal_class.identifier: info
focal_class.modifiers: public
focal_class.parameters: (String pid)
focal_class.return: Object
focal_class.signature: Object info(String pid)
focal_class.class_method_signature: ConfigurationCommands.convert(Class<?> desiredType, Object in)
focal_class.full_signature: @Override public Object convert(Class<?> desiredType, Object in)
focal_class.identifier: convert
focal_class.modifiers: @Override public
focal_class.parameters: (Class<?> desiredType, Object in)
focal_class.return: Object
focal_class.signature: Object convert(Class<?> desiredType, Object in)
focal_class.class_method_signature: ConfigurationCommands.format(Object target, int level, Converter escape)
focal_class.full_signature: @Override public CharSequence format(Object target, int level, Converter escape)
focal_class.identifier: format
focal_class.modifiers: @Override public
focal_class.parameters: (Object target, int level, Converter escape)
focal_class.return: CharSequence
focal_class.signature: CharSequence format(Object target, int level, Converter escape)
focal_class.class_method_signature: ConfigurationCommands.format(Configuration[] configs, int level, Converter escape)
focal_class.full_signature: private CharSequence format(Configuration[] configs, int level, Converter escape)
focal_class.identifier: format
focal_class.modifiers: private
focal_class.parameters: (Configuration[] configs, int level, Converter escape)
focal_class.return: CharSequence
focal_class.signature: CharSequence format(Configuration[] configs, int level, Converter escape)
focal_class.class_method_signature: ConfigurationCommands.format(Configuration config, int level, Converter escape)
focal_class.full_signature: private CharSequence format(Configuration config, int level, Converter escape)
focal_class.identifier: format
focal_class.modifiers: private
focal_class.parameters: (Configuration config, int level, Converter escape)
focal_class.return: CharSequence
focal_class.signature: CharSequence format(Configuration config, int level, Converter escape)
focal_class.class_method_signature: ConfigurationCommands.formatType(Object value)
focal_class.full_signature: private String formatType(Object value)
focal_class.identifier: formatType
focal_class.modifiers: private
focal_class.parameters: (Object value)
focal_class.return: String
focal_class.signature: String formatType(Object value)
focal_class.class_method_signature: ConfigurationCommands.compareConfigurations(Configuration a, Configuration b)
focal_class.full_signature: static int compareConfigurations(Configuration a, Configuration b)
focal_class.identifier: compareConfigurations
focal_class.modifiers: static
focal_class.parameters: (Configuration a, Configuration b)
focal_class.return: int
focal_class.signature: int compareConfigurations(Configuration a, Configuration b)
focal_method.body: static int compareConfigurations(Configuration a, Configuration b) {
  		String factoryA = a.getFactoryPid();
  		String factoryB = b.getFactoryPid();
  
  		int result = 0;
  
  		if (factoryA != null) {
  			if (factoryB == null)
  				result = -1;
  			else
  				result = factoryA.compareTo(factoryB);
  		} else {
  			if (factoryB == null)
  				result = 0;
  			else
  				result = 1;
  		}
  
  		if (result == 0)
  			result = a.getPid().compareTo(b.getPid());
  
  		return result;
  	}
focal_method.class_method_signature: ConfigurationCommands.compareConfigurations(Configuration a, Configuration b)
focal_method.full_signature: static int compareConfigurations(Configuration a, Configuration b)
focal_method.identifier: compareConfigurations
focal_method.invocations: getFactoryPid getFactoryPid compareTo compareTo getPid getPid
focal_method.modifiers: static
focal_method.parameters: (Configuration a, Configuration b)
focal_method.return: int
focal_method.signature: int compareConfigurations(Configuration a, Configuration b)