test_class.declarator: testInputBaseDir = new File("src/test/resources/JsonConverterTest")
test_class.modifier: private final
test_class.original_string: private final File testInputBaseDir = new File("src/test/resources/JsonConverterTest");
test_class.type: File
test_class.var_name: testInputBaseDir
test_class.declarator: testOutputBaseDir = new File("target/test-out/JsonConverterTest")
test_class.modifier: private final
test_class.original_string: private final File testOutputBaseDir = new File("target/test-out/JsonConverterTest");
test_class.type: File
test_class.var_name: testOutputBaseDir
test_class.file: maven/src/test/java/net/adamcin/oakpal/maven/component/JsonConverterTest.java
test_class.identifier: JsonConverterTest
test_case.body: @Test(expected = ComponentConfigurationException.class)
      public void testConvertChild_hintBoolean_throws() throws Exception {
          ExpressionEvaluator eval = mock(ExpressionEvaluator.class);
          when(eval.evaluate(anyString())).thenAnswer(call -> call.getArgument(0, String.class));
          converter().convertChild(xml("fooBar.xml", "boolean"), eval);
      }
test_case.class_method_signature: JsonConverterTest.testConvertChild_hintBoolean_throws()
test_case.full_signature: @Test(expected = ComponentConfigurationException.class) public void testConvertChild_hintBoolean_throws()
test_case.identifier: testConvertChild_hintBoolean_throws
test_case.invocations: mock thenAnswer when evaluate anyString getArgument convertChild converter xml
test_case.modifiers: @Test(expected = ComponentConfigurationException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConvertChild_hintBoolean_throws()
focal_class.declarator: HINT_LIST = "list"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_LIST = "list";
focal_class.type: String
focal_class.var_name: HINT_LIST
focal_class.declarator: HINT_MAP = "map"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_MAP = "map";
focal_class.type: String
focal_class.var_name: HINT_MAP
focal_class.declarator: HINT_STRING = "string"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_STRING = "string";
focal_class.type: String
focal_class.var_name: HINT_STRING
focal_class.declarator: HINT_NUMBER = "number"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_NUMBER = "number";
focal_class.type: String
focal_class.var_name: HINT_NUMBER
focal_class.declarator: HINT_BOOLEAN = "boolean"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_BOOLEAN = "boolean";
focal_class.type: String
focal_class.var_name: HINT_BOOLEAN
focal_class.declarator: HINT_VALUE_LITERAL = "json"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_VALUE_LITERAL = "json";
focal_class.type: String
focal_class.var_name: HINT_VALUE_LITERAL
focal_class.declarator: HINT_OBJECT_LITERAL = "jsonobject"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_OBJECT_LITERAL = "jsonobject";
focal_class.type: String
focal_class.var_name: HINT_OBJECT_LITERAL
focal_class.declarator: HINT_ARRAY_LITERAL = "jsonarray"
focal_class.modifier: static final
focal_class.original_string: static final String HINT_ARRAY_LITERAL = "jsonarray";
focal_class.type: String
focal_class.var_name: HINT_ARRAY_LITERAL
focal_class.declarator: KEY_DELIM = Pattern.compile("(_|\\W|(?=[A-Z]))")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern KEY_DELIM = Pattern.compile("(_|\\W|(?=[A-Z]))");
focal_class.type: Pattern
focal_class.var_name: KEY_DELIM
focal_class.declarator: DOUBLE_ESS_E_ESS_TO_DOUBLE_ESS = Pattern.compile("sses$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern DOUBLE_ESS_E_ESS_TO_DOUBLE_ESS = Pattern.compile("sses$");
focal_class.type: Pattern
focal_class.var_name: DOUBLE_ESS_E_ESS_TO_DOUBLE_ESS
focal_class.declarator: I_E_ESS_TO_I = Pattern.compile("(?<=[a-z]{2})ies$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern I_E_ESS_TO_I = Pattern.compile("(?<=[a-z]{2})ies$");
focal_class.type: Pattern
focal_class.var_name: I_E_ESS_TO_I
focal_class.declarator: I_E_ESS_TO_IE = Pattern.compile("ies$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern I_E_ESS_TO_IE = Pattern.compile("ies$");
focal_class.type: Pattern
focal_class.var_name: I_E_ESS_TO_IE
focal_class.declarator: PRECEDING_VOWEL_NOT_DOUBLE_ESS = Pattern.compile("^.*[aeiouwy].*[^s]s$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern PRECEDING_VOWEL_NOT_DOUBLE_ESS = Pattern.compile("^.*[aeiouwy].*[^s]s$");
focal_class.type: Pattern
focal_class.var_name: PRECEDING_VOWEL_NOT_DOUBLE_ESS
focal_class.declarator: ESS_SUFFIX_TO_DROP = Pattern.compile("s$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern ESS_SUFFIX_TO_DROP = Pattern.compile("s$");
focal_class.type: Pattern
focal_class.var_name: ESS_SUFFIX_TO_DROP
focal_class.declarator: REPLACEABLE_WHY_TO_I = Pattern.compile("(?<=[a-z][^aeiou])y$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern REPLACEABLE_WHY_TO_I = Pattern.compile("(?<=[a-z][^aeiou])y$");
focal_class.type: Pattern
focal_class.var_name: REPLACEABLE_WHY_TO_I
focal_class.file: maven/src/main/java/net/adamcin/oakpal/maven/component/JsonConverter.java
focal_class.identifier: JsonConverter
focal_class.class_method_signature: JsonConverter.plexusPluralStem(final String key)
focal_class.full_signature: public static String plexusPluralStem(final String key)
focal_class.identifier: plexusPluralStem
focal_class.modifiers: public static
focal_class.parameters: (final String key)
focal_class.return: String
focal_class.signature: String plexusPluralStem(final String key)
focal_class.class_method_signature: JsonConverter.canConvert(final Class<?> type)
focal_class.full_signature: @Override public boolean canConvert(final Class<?> type)
focal_class.identifier: canConvert
focal_class.modifiers: @Override public
focal_class.parameters: (final Class<?> type)
focal_class.return: boolean
focal_class.signature: boolean canConvert(final Class<?> type)
focal_class.class_method_signature: JsonConverter.fromConfiguration(final ConverterLookup lookup,
                                      final PlexusConfiguration configuration,
                                      final Class<?> type,
                                      final Class<?> enclosingType,
                                      final ClassLoader loader,
                                      final ExpressionEvaluator evaluator,
                                      final ConfigurationListener listener)
focal_class.full_signature: @Override public Object fromConfiguration(final ConverterLookup lookup,
                                      final PlexusConfiguration configuration,
                                      final Class<?> type,
                                      final Class<?> enclosingType,
                                      final ClassLoader loader,
                                      final ExpressionEvaluator evaluator,
                                      final ConfigurationListener listener)
focal_class.identifier: fromConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final ConverterLookup lookup,
                                      final PlexusConfiguration configuration,
                                      final Class<?> type,
                                      final Class<?> enclosingType,
                                      final ClassLoader loader,
                                      final ExpressionEvaluator evaluator,
                                      final ConfigurationListener listener)
focal_class.return: Object
focal_class.signature: Object fromConfiguration(final ConverterLookup lookup,
                                      final PlexusConfiguration configuration,
                                      final Class<?> type,
                                      final Class<?> enclosingType,
                                      final ClassLoader loader,
                                      final ExpressionEvaluator evaluator,
                                      final ConfigurationListener listener)
focal_class.class_method_signature: JsonConverter.convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
focal_class.full_signature: public JsonValue convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
focal_class.identifier: convertChild
focal_class.modifiers: public
focal_class.parameters: (final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
focal_class.return: JsonValue
focal_class.signature: JsonValue convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
focal_class.class_method_signature: JsonConverter.mightBeList(final @NotNull PlexusConfiguration config)
focal_class.full_signature:  boolean mightBeList(final @NotNull PlexusConfiguration config)
focal_class.identifier: mightBeList
focal_class.parameters: (final @NotNull PlexusConfiguration config)
focal_class.return: boolean
focal_class.signature: boolean mightBeList(final @NotNull PlexusConfiguration config)
focal_class.class_method_signature: JsonConverter.readJsonObjectFromConfig(final @NotNull PlexusConfiguration config,
                                          final ExpressionEvaluator evaluator)
focal_class.full_signature:  JsonObject readJsonObjectFromConfig(final @NotNull PlexusConfiguration config,
                                          final ExpressionEvaluator evaluator)
focal_class.identifier: readJsonObjectFromConfig
focal_class.parameters: (final @NotNull PlexusConfiguration config,
                                          final ExpressionEvaluator evaluator)
focal_class.return: JsonObject
focal_class.signature: JsonObject readJsonObjectFromConfig(final @NotNull PlexusConfiguration config,
                                          final ExpressionEvaluator evaluator)
focal_class.class_method_signature: JsonConverter.readJsonArrayFromConfig(final @NotNull PlexusConfiguration config,
                                        final ExpressionEvaluator evaluator)
focal_class.full_signature:  JsonArray readJsonArrayFromConfig(final @NotNull PlexusConfiguration config,
                                        final ExpressionEvaluator evaluator)
focal_class.identifier: readJsonArrayFromConfig
focal_class.parameters: (final @NotNull PlexusConfiguration config,
                                        final ExpressionEvaluator evaluator)
focal_class.return: JsonArray
focal_class.signature: JsonArray readJsonArrayFromConfig(final @NotNull PlexusConfiguration config,
                                        final ExpressionEvaluator evaluator)
focal_class.class_method_signature: JsonConverter.readJsonObjectFromValue(final String key, final @Nullable Object value)
focal_class.full_signature:  JsonValue readJsonObjectFromValue(final String key, final @Nullable Object value)
focal_class.identifier: readJsonObjectFromValue
focal_class.parameters: (final String key, final @Nullable Object value)
focal_class.return: JsonValue
focal_class.signature: JsonValue readJsonObjectFromValue(final String key, final @Nullable Object value)
focal_class.class_method_signature: JsonConverter.readJsonArrayFromValue(final String key, final @Nullable Object value)
focal_class.full_signature:  JsonValue readJsonArrayFromValue(final String key, final @Nullable Object value)
focal_class.identifier: readJsonArrayFromValue
focal_class.parameters: (final String key, final @Nullable Object value)
focal_class.return: JsonValue
focal_class.signature: JsonValue readJsonArrayFromValue(final String key, final @Nullable Object value)
focal_class.class_method_signature: JsonConverter.readJsonValueFromValue(final String key, final @Nullable Object value)
focal_class.full_signature:  JsonValue readJsonValueFromValue(final String key, final @Nullable Object value)
focal_class.identifier: readJsonValueFromValue
focal_class.parameters: (final String key, final @Nullable Object value)
focal_class.return: JsonValue
focal_class.signature: JsonValue readJsonValueFromValue(final String key, final @Nullable Object value)
focal_class.class_method_signature: JsonConverter.readNumberFromValue(final String key, final @Nullable Object value)
focal_class.full_signature:  Number readNumberFromValue(final String key, final @Nullable Object value)
focal_class.identifier: readNumberFromValue
focal_class.parameters: (final String key, final @Nullable Object value)
focal_class.return: Number
focal_class.signature: Number readNumberFromValue(final String key, final @Nullable Object value)
focal_class.class_method_signature: JsonConverter.isBlankish(final Object value)
focal_class.full_signature:  boolean isBlankish(final Object value)
focal_class.identifier: isBlankish
focal_class.parameters: (final Object value)
focal_class.return: boolean
focal_class.signature: boolean isBlankish(final Object value)
focal_class.class_method_signature: JsonConverter.readBooleanFromValue(final String key, final @Nullable Object value)
focal_class.full_signature:  Boolean readBooleanFromValue(final String key, final @Nullable Object value)
focal_class.identifier: readBooleanFromValue
focal_class.parameters: (final String key, final @Nullable Object value)
focal_class.return: Boolean
focal_class.signature: Boolean readBooleanFromValue(final String key, final @Nullable Object value)
focal_class.class_method_signature: JsonConverter.stringToValue(String string)
focal_class.full_signature: public static Object stringToValue(String string)
focal_class.identifier: stringToValue
focal_class.modifiers: public static
focal_class.parameters: (String string)
focal_class.return: Object
focal_class.signature: Object stringToValue(String string)
focal_class.superclass: extends AbstractConfigurationConverter
focal_method.body: public JsonValue convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
              throws ComponentConfigurationException {
          final Object value = fromExpression(child, evaluator);
          final String hint = child.getAttribute("hint");
          if (hint != null) {
              switch (hint.toLowerCase()) {
                  case HINT_MAP:
                      return readJsonObjectFromConfig(child, evaluator);
                  case HINT_LIST:
                      return readJsonArrayFromConfig(child, evaluator);
                  case HINT_STRING:
                      return JavaxJson.wrap(String.valueOf(value));
                  case HINT_NUMBER:
                      return JavaxJson.wrap(readNumberFromValue(child.getName(), value));
                  case HINT_BOOLEAN:
                      return JavaxJson.wrap(readBooleanFromValue(child.getName(), value));
                  case HINT_VALUE_LITERAL:
                      return readJsonValueFromValue(child.getName(), value);
                  case HINT_OBJECT_LITERAL:
                      return readJsonObjectFromValue(child.getName(), value);
                  case HINT_ARRAY_LITERAL:
                      return readJsonArrayFromValue(child.getName(), value);
                  default:
                      throw new ComponentConfigurationException("Unsupported JSON config hint type for key: " +
                              child.getName() + ", hint=" + hint);
              }
          } else if (child.getChildCount() > 0) {
              if (mightBeList(child)) {
                  return readJsonArrayFromConfig(child, evaluator);
              } else {
                  return readJsonObjectFromConfig(child, evaluator);
              }
          }
          if (value instanceof String) {
              return JavaxJson.val(stringToValue((String) value)).get();
          }
          return JavaxJson.val(value).get();
      }
focal_method.class_method_signature: JsonConverter.convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
focal_method.full_signature: public JsonValue convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
focal_method.identifier: convertChild
focal_method.invocations: fromExpression getAttribute toLowerCase readJsonObjectFromConfig readJsonArrayFromConfig wrap valueOf wrap readNumberFromValue getName wrap readBooleanFromValue getName readJsonValueFromValue getName readJsonObjectFromValue getName readJsonArrayFromValue getName getName getChildCount mightBeList readJsonArrayFromConfig readJsonObjectFromConfig get val stringToValue get val
focal_method.modifiers: public
focal_method.parameters: (final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)
focal_method.return: JsonValue
focal_method.signature: JsonValue convertChild(final @NotNull PlexusConfiguration child, final ExpressionEvaluator evaluator)