test_class.file: ljcm-core/src/test/java/io/github/leberkleber/ljcm/ConfigurationProcessorTest.java
test_class.identifier: ConfigurationProcessorTest
test_case.body: @Test
      public void process() throws Exception {
          Class parserResponsibility = String.class;
          Properties properties = new Properties();
          ConfigurationParser configurationParser = new ConfigurationParserDummyImpl(parserResponsibility);
          Map<Class, ConfigurationParser> configurationParserMap = new HashMap<>();
  
          properties.put("test.exists", "MyCustomValue");
          configurationParserMap.put(parserResponsibility, configurationParser);
  
          ConfigurationProcessor configurationProcessor = new ConfigurationProcessor(properties, configurationParserMap);
          ConfigDummyImpl cfg = configurationProcessor.process(ConfigDummyImpl.class);
  
          assertNotNull(cfg);
          assertEquals(cfg.getTestExists(), "MyCustomValue");
          assertEquals(cfg.getTestWithDefault(), "defaultV");
          assertEquals(cfg.getTestWithoutAnnotation(), "default");
          assertEquals(cfg.getTestDoseNotExists(), null);
      }
test_case.class_method_signature: ConfigurationProcessorTest.process()
test_case.full_signature: @Test public void process()
test_case.identifier: process
test_case.invocations: put put process assertNotNull assertEquals getTestExists assertEquals getTestWithDefault assertEquals getTestWithoutAnnotation assertEquals getTestDoseNotExists
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void process()
focal_class.declarator: LOGGER = Logger.getLogger(ConfigurationProcessor.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(ConfigurationProcessor.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: configurations
focal_class.modifier: private
focal_class.original_string: private Properties configurations;
focal_class.type: Properties
focal_class.var_name: configurations
focal_class.declarator: configurationParsers
focal_class.modifier: private
focal_class.original_string: private Map<Class, ConfigurationParser> configurationParsers;
focal_class.type: Map<Class, ConfigurationParser>
focal_class.var_name: configurationParsers
focal_class.file: ljcm-core/src/main/java/io/github/leberkleber/ljcm/ConfigurationProcessor.java
focal_class.identifier: ConfigurationProcessor
focal_class.class_method_signature: ConfigurationProcessor.ConfigurationProcessor(Properties configurations, Map<Class, ConfigurationParser> configurationParsers)
focal_class.full_signature:   ConfigurationProcessor(Properties configurations, Map<Class, ConfigurationParser> configurationParsers)
focal_class.identifier: ConfigurationProcessor
focal_class.parameters: (Properties configurations, Map<Class, ConfigurationParser> configurationParsers)
focal_class.signature:  ConfigurationProcessor(Properties configurations, Map<Class, ConfigurationParser> configurationParsers)
focal_class.class_method_signature: ConfigurationProcessor.process(Class<C> configurationClass)
focal_class.full_signature: public C process(Class<C> configurationClass)
focal_class.identifier: process
focal_class.modifiers: public
focal_class.parameters: (Class<C> configurationClass)
focal_class.return: C
focal_class.signature: C process(Class<C> configurationClass)
focal_class.class_method_signature: ConfigurationProcessor.parseConfiguration(Class targetType, String value)
focal_class.full_signature: private Object parseConfiguration(Class targetType, String value)
focal_class.identifier: parseConfiguration
focal_class.modifiers: private
focal_class.parameters: (Class targetType, String value)
focal_class.return: Object
focal_class.signature: Object parseConfiguration(Class targetType, String value)
focal_class.class_method_signature: ConfigurationProcessor.findResponsibleConfigurationParser(Class targetType)
focal_class.full_signature: private List<ConfigurationParser> findResponsibleConfigurationParser(Class targetType)
focal_class.identifier: findResponsibleConfigurationParser
focal_class.modifiers: private
focal_class.parameters: (Class targetType)
focal_class.return: List<ConfigurationParser>
focal_class.signature: List<ConfigurationParser> findResponsibleConfigurationParser(Class targetType)
focal_class.class_method_signature: ConfigurationProcessor.setObjValue(Object object, String fieldName, Object fieldValue)
focal_class.full_signature: private void setObjValue(Object object, String fieldName, Object fieldValue)
focal_class.identifier: setObjValue
focal_class.modifiers: private
focal_class.parameters: (Object object, String fieldName, Object fieldValue)
focal_class.return: void
focal_class.signature: void setObjValue(Object object, String fieldName, Object fieldValue)
focal_method.body: public <C> C process(Class<C> configurationClass) throws IllegalAccessException, InstantiationException {
          C configurationInstance = configurationClass.newInstance();
          Field[] configurationProperties = configurationClass.getDeclaredFields();
  
          for (Field configurationProperty : configurationProperties) {
              Configuration configuration = configurationProperty.getAnnotation(Configuration.class);
  
              if (configuration != null) {
                  String sourceConfiguration = configurations.getProperty(configuration.value(), configuration.defaultValue());
  
                  if (sourceConfiguration != null && !Configuration.DEFAULT_VALUE.equals(sourceConfiguration)) {
                      Class targetType = configurationProperty.getType();
  
                      Object parsedConfiguration = parseConfiguration(targetType, sourceConfiguration);
                      if (parsedConfiguration != null) {
                          setObjValue(configurationInstance, configurationProperty.getName(), parsedConfiguration);
                      }
                  } else {
                      String msg = MessageFormat.format("No configuration found for ''{0}''", configuration.value());
                      LOGGER.warning(msg);
                  }
              }
          }
  
          return configurationInstance;
      }
focal_method.class_method_signature: ConfigurationProcessor.process(Class<C> configurationClass)
focal_method.full_signature: public C process(Class<C> configurationClass)
focal_method.identifier: process
focal_method.invocations: newInstance getDeclaredFields getAnnotation getProperty value defaultValue equals getType parseConfiguration setObjValue getName format value warning
focal_method.modifiers: public
focal_method.parameters: (Class<C> configurationClass)
focal_method.return: C
focal_method.signature: C process(Class<C> configurationClass)