test_class.declarator: eventBus
test_class.modifier: @Mock
  	@Bind
test_class.original_string: @Mock
  	@Bind
  	EventBus eventBus;
test_class.type: EventBus
test_class.var_name: eventBus
test_class.declarator: executor
test_class.modifier: @Mock
  	@Bind
test_class.original_string: @Mock
  	@Bind
  	ScheduledExecutorService executor;
test_class.type: ScheduledExecutorService
test_class.var_name: executor
test_class.declarator: runeliteConfig
test_class.modifier: @Mock
  	@Bind
test_class.original_string: @Mock
  	@Bind
  	RuneLiteConfig runeliteConfig;
test_class.type: RuneLiteConfig
test_class.var_name: runeliteConfig
test_class.declarator: sessionfile = RuneLite.DEFAULT_SESSION_FILE
test_class.modifier: @Bind
  	@Named("sessionfile")
test_class.original_string: @Bind
  	@Named("sessionfile")
  	File sessionfile = RuneLite.DEFAULT_SESSION_FILE;
test_class.type: File
test_class.var_name: sessionfile
test_class.declarator: config = RuneLite.DEFAULT_CONFIG_FILE
test_class.modifier: @Bind
  	@Named("config")
test_class.original_string: @Bind
  	@Named("config")
  	File config = RuneLite.DEFAULT_CONFIG_FILE;
test_class.type: File
test_class.var_name: config
test_class.declarator: manager
test_class.modifier: @Inject
test_class.original_string: @Inject
  	ConfigManager manager;
test_class.type: ConfigManager
test_class.var_name: manager
test_class.file: runelite-client/src/test/java/net/runelite/client/config/ConfigManagerTest.java
test_class.identifier: ConfigManagerTest
test_case.body: @Test
  	public void testGetConfigDescriptor() throws IOException
  	{
  		AccountSession accountSession = new AccountSession(UUID.randomUUID(), Instant.now());
  		accountSession.setUsername("test");
  
  		TestConfig conf = manager.getConfig(TestConfig.class);
  		ConfigDescriptor descriptor = manager.getConfigDescriptor(conf);
  		Assert.assertEquals(1, descriptor.getItems().size());
  	}
test_case.class_method_signature: ConfigManagerTest.testGetConfigDescriptor()
test_case.full_signature: @Test public void testGetConfigDescriptor()
test_case.identifier: testGetConfigDescriptor
test_case.invocations: randomUUID now setUsername getConfig getConfigDescriptor assertEquals size getItems
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetConfigDescriptor()
focal_class.declarator: TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss")
focal_class.modifier: private static final
focal_class.original_string: private static final DateFormat TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
focal_class.type: DateFormat
focal_class.var_name: TIME_FORMAT
focal_class.declarator: settingsFileInput
focal_class.modifier: private final
focal_class.original_string: private final File settingsFileInput;
focal_class.type: File
focal_class.var_name: settingsFileInput
focal_class.declarator: eventBus
focal_class.modifier: private final
focal_class.original_string: private final EventBus eventBus;
focal_class.type: EventBus
focal_class.var_name: eventBus
focal_class.declarator: okHttpClient
focal_class.modifier: private final
focal_class.original_string: private final OkHttpClient okHttpClient;
focal_class.type: OkHttpClient
focal_class.var_name: okHttpClient
focal_class.declarator: session
focal_class.modifier: private
focal_class.original_string: private AccountSession session;
focal_class.type: AccountSession
focal_class.var_name: session
focal_class.declarator: client
focal_class.modifier: private
focal_class.original_string: private ConfigClient client;
focal_class.type: ConfigClient
focal_class.var_name: client
focal_class.declarator: propertiesFile
focal_class.modifier: private
focal_class.original_string: private File propertiesFile;
focal_class.type: File
focal_class.var_name: propertiesFile
focal_class.declarator: handler = new ConfigInvocationHandler(this)
focal_class.modifier: private final
focal_class.original_string: private final ConfigInvocationHandler handler = new ConfigInvocationHandler(this);
focal_class.type: ConfigInvocationHandler
focal_class.var_name: handler
focal_class.declarator: properties = new Properties()
focal_class.modifier: private final
focal_class.original_string: private final Properties properties = new Properties();
focal_class.type: Properties
focal_class.var_name: properties
focal_class.declarator: pendingChanges = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, String> pendingChanges = new HashMap<>();
focal_class.type: Map<String, String>
focal_class.var_name: pendingChanges
focal_class.file: runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java
focal_class.identifier: ConfigManager
focal_class.class_method_signature: ConfigManager.ConfigManager(
  		@Named("config") File config,
  		ScheduledExecutorService scheduledExecutorService,
  		EventBus eventBus,
  		OkHttpClient okHttpClient)
focal_class.full_signature: @Inject public  ConfigManager(
  		@Named("config") File config,
  		ScheduledExecutorService scheduledExecutorService,
  		EventBus eventBus,
  		OkHttpClient okHttpClient)
focal_class.identifier: ConfigManager
focal_class.modifiers: @Inject public
focal_class.parameters: (
  		@Named("config") File config,
  		ScheduledExecutorService scheduledExecutorService,
  		EventBus eventBus,
  		OkHttpClient okHttpClient)
focal_class.signature:  ConfigManager(
  		@Named("config") File config,
  		ScheduledExecutorService scheduledExecutorService,
  		EventBus eventBus,
  		OkHttpClient okHttpClient)
focal_class.class_method_signature: ConfigManager.switchSession(AccountSession session)
focal_class.full_signature: public final void switchSession(AccountSession session)
focal_class.identifier: switchSession
focal_class.modifiers: public final
focal_class.parameters: (AccountSession session)
focal_class.return: void
focal_class.signature: void switchSession(AccountSession session)
focal_class.class_method_signature: ConfigManager.getLocalPropertiesFile()
focal_class.full_signature: private File getLocalPropertiesFile()
focal_class.identifier: getLocalPropertiesFile
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getLocalPropertiesFile()
focal_class.class_method_signature: ConfigManager.getPropertiesFile()
focal_class.full_signature: private File getPropertiesFile()
focal_class.identifier: getPropertiesFile
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getPropertiesFile()
focal_class.class_method_signature: ConfigManager.load()
focal_class.full_signature: public void load()
focal_class.identifier: load
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void load()
focal_class.class_method_signature: ConfigManager.syncPropertiesFromFile(File propertiesFile)
focal_class.full_signature: private synchronized void syncPropertiesFromFile(File propertiesFile)
focal_class.identifier: syncPropertiesFromFile
focal_class.modifiers: private synchronized
focal_class.parameters: (File propertiesFile)
focal_class.return: void
focal_class.signature: void syncPropertiesFromFile(File propertiesFile)
focal_class.class_method_signature: ConfigManager.importLocal()
focal_class.full_signature: public void importLocal()
focal_class.identifier: importLocal
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void importLocal()
focal_class.class_method_signature: ConfigManager.loadFromFile()
focal_class.full_signature: private synchronized void loadFromFile()
focal_class.identifier: loadFromFile
focal_class.modifiers: private synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void loadFromFile()
focal_class.class_method_signature: ConfigManager.saveToFile(final File propertiesFile)
focal_class.full_signature: private void saveToFile(final File propertiesFile)
focal_class.identifier: saveToFile
focal_class.modifiers: private
focal_class.parameters: (final File propertiesFile)
focal_class.return: void
focal_class.signature: void saveToFile(final File propertiesFile)
focal_class.class_method_signature: ConfigManager.getConfig(Class<T> clazz)
focal_class.full_signature: public T getConfig(Class<T> clazz)
focal_class.identifier: getConfig
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz)
focal_class.return: T
focal_class.signature: T getConfig(Class<T> clazz)
focal_class.class_method_signature: ConfigManager.getConfigurationKeys(String prefix)
focal_class.full_signature: public List<String> getConfigurationKeys(String prefix)
focal_class.identifier: getConfigurationKeys
focal_class.modifiers: public
focal_class.parameters: (String prefix)
focal_class.return: List<String>
focal_class.signature: List<String> getConfigurationKeys(String prefix)
focal_class.class_method_signature: ConfigManager.getConfiguration(String groupName, String key)
focal_class.full_signature: public String getConfiguration(String groupName, String key)
focal_class.identifier: getConfiguration
focal_class.modifiers: public
focal_class.parameters: (String groupName, String key)
focal_class.return: String
focal_class.signature: String getConfiguration(String groupName, String key)
focal_class.class_method_signature: ConfigManager.getConfiguration(String groupName, String key, Class<T> clazz)
focal_class.full_signature: public T getConfiguration(String groupName, String key, Class<T> clazz)
focal_class.identifier: getConfiguration
focal_class.modifiers: public
focal_class.parameters: (String groupName, String key, Class<T> clazz)
focal_class.return: T
focal_class.signature: T getConfiguration(String groupName, String key, Class<T> clazz)
focal_class.class_method_signature: ConfigManager.setConfiguration(String groupName, String key, String value)
focal_class.full_signature: public void setConfiguration(String groupName, String key, String value)
focal_class.identifier: setConfiguration
focal_class.modifiers: public
focal_class.parameters: (String groupName, String key, String value)
focal_class.return: void
focal_class.signature: void setConfiguration(String groupName, String key, String value)
focal_class.class_method_signature: ConfigManager.setConfiguration(String groupName, String key, Object value)
focal_class.full_signature: public void setConfiguration(String groupName, String key, Object value)
focal_class.identifier: setConfiguration
focal_class.modifiers: public
focal_class.parameters: (String groupName, String key, Object value)
focal_class.return: void
focal_class.signature: void setConfiguration(String groupName, String key, Object value)
focal_class.class_method_signature: ConfigManager.unsetConfiguration(String groupName, String key)
focal_class.full_signature: public void unsetConfiguration(String groupName, String key)
focal_class.identifier: unsetConfiguration
focal_class.modifiers: public
focal_class.parameters: (String groupName, String key)
focal_class.return: void
focal_class.signature: void unsetConfiguration(String groupName, String key)
focal_class.class_method_signature: ConfigManager.getConfigDescriptor(Config configurationProxy)
focal_class.full_signature: public ConfigDescriptor getConfigDescriptor(Config configurationProxy)
focal_class.identifier: getConfigDescriptor
focal_class.modifiers: public
focal_class.parameters: (Config configurationProxy)
focal_class.return: ConfigDescriptor
focal_class.signature: ConfigDescriptor getConfigDescriptor(Config configurationProxy)
focal_class.class_method_signature: ConfigManager.setDefaultConfiguration(Object proxy, boolean override)
focal_class.full_signature: public void setDefaultConfiguration(Object proxy, boolean override)
focal_class.identifier: setDefaultConfiguration
focal_class.modifiers: public
focal_class.parameters: (Object proxy, boolean override)
focal_class.return: void
focal_class.signature: void setDefaultConfiguration(Object proxy, boolean override)
focal_class.class_method_signature: ConfigManager.stringToObject(String str, Class<?> type)
focal_class.full_signature: static Object stringToObject(String str, Class<?> type)
focal_class.identifier: stringToObject
focal_class.modifiers: static
focal_class.parameters: (String str, Class<?> type)
focal_class.return: Object
focal_class.signature: Object stringToObject(String str, Class<?> type)
focal_class.class_method_signature: ConfigManager.objectToString(Object object)
focal_class.full_signature: static String objectToString(Object object)
focal_class.identifier: objectToString
focal_class.modifiers: static
focal_class.parameters: (Object object)
focal_class.return: String
focal_class.signature: String objectToString(Object object)
focal_class.class_method_signature: ConfigManager.onClientShutdown(ClientShutdown e)
focal_class.full_signature: @Subscribe(priority = 100) private void onClientShutdown(ClientShutdown e)
focal_class.identifier: onClientShutdown
focal_class.modifiers: @Subscribe(priority = 100) private
focal_class.parameters: (ClientShutdown e)
focal_class.return: void
focal_class.signature: void onClientShutdown(ClientShutdown e)
focal_class.class_method_signature: ConfigManager.sendConfig()
focal_class.full_signature: @Nullable private CompletableFuture<Void> sendConfig()
focal_class.identifier: sendConfig
focal_class.modifiers: @Nullable private
focal_class.parameters: ()
focal_class.return: CompletableFuture<Void>
focal_class.signature: CompletableFuture<Void> sendConfig()
focal_method.body: public ConfigDescriptor getConfigDescriptor(Config configurationProxy)
  	{
  		Class<?> inter = configurationProxy.getClass().getInterfaces()[0];
  		ConfigGroup group = inter.getAnnotation(ConfigGroup.class);
  
  		if (group == null)
  		{
  			throw new IllegalArgumentException("Not a config group");
  		}
  
  		final List<ConfigSectionDescriptor> sections = Arrays.stream(inter.getDeclaredFields())
  			.filter(m -> m.isAnnotationPresent(ConfigSection.class) && m.getType() == String.class)
  			.map(m ->
  			{
  				try
  				{
  					return new ConfigSectionDescriptor(
  						String.valueOf(m.get(inter)),
  						m.getDeclaredAnnotation(ConfigSection.class)
  					);
  				}
  				catch (IllegalAccessException e)
  				{
  					log.warn("Unable to load section {}::{}", inter.getSimpleName(), m.getName());
  					return null;
  				}
  			})
  			.filter(Objects::nonNull)
  			.sorted((a, b) -> ComparisonChain.start()
  				.compare(a.getSection().position(), b.getSection().position())
  				.compare(a.getSection().name(), b.getSection().name())
  				.result())
  			.collect(Collectors.toList());
  
  		final List<ConfigItemDescriptor> items = Arrays.stream(inter.getMethods())
  			.filter(m -> m.getParameterCount() == 0 && m.isAnnotationPresent(ConfigItem.class))
  			.map(m -> new ConfigItemDescriptor(
  				m.getDeclaredAnnotation(ConfigItem.class),
  				m.getReturnType(),
  				m.getDeclaredAnnotation(Range.class),
  				m.getDeclaredAnnotation(Alpha.class),
  				m.getDeclaredAnnotation(Units.class)
  			))
  			.sorted((a, b) -> ComparisonChain.start()
  				.compare(a.getItem().position(), b.getItem().position())
  				.compare(a.getItem().name(), b.getItem().name())
  				.result())
  			.collect(Collectors.toList());
  
  		return new ConfigDescriptor(group, sections, items);
  	}
focal_method.class_method_signature: ConfigManager.getConfigDescriptor(Config configurationProxy)
focal_method.full_signature: public ConfigDescriptor getConfigDescriptor(Config configurationProxy)
focal_method.identifier: getConfigDescriptor
focal_method.invocations: getInterfaces getClass getAnnotation collect sorted filter map filter stream getDeclaredFields isAnnotationPresent getType valueOf get getDeclaredAnnotation warn getSimpleName getName result compare compare start position getSection position getSection name getSection name getSection toList collect sorted map filter stream getMethods getParameterCount isAnnotationPresent getDeclaredAnnotation getReturnType getDeclaredAnnotation getDeclaredAnnotation getDeclaredAnnotation result compare compare start position getItem position getItem name getItem name getItem toList
focal_method.modifiers: public
focal_method.parameters: (Config configurationProxy)
focal_method.return: ConfigDescriptor
focal_method.signature: ConfigDescriptor getConfigDescriptor(Config configurationProxy)