code: @SuppressWarnings({
       "unchecked", "rawtypes"
      })
      @Override
      public void extend(final String key, final Object value) {
          final Object v = configuration.get(key);
          if (v == null) {
              final Object array = Array.newInstance(value.getClass(), 1);
              Array.set(array, 0, value);
              configuration.put(key, array);
          }
          else {
              final Class<?> clazz = v.getClass();
              if (clazz.isArray()) {
                  final int length = Array.getLength(v);
                  final Object array = Array.newInstance(clazz.getComponentType(), length + 1);
                  System.arraycopy(v, 0, array, 0, length);
                  Array.set(array, length, value);
                  configuration.put(key, array);
              }
              else if (v instanceof Collection) {
                  ((Collection) v).add(value);
              }
              else {
                  final String message = String.format("Cannot extend %s by %s.", key, value);
                  throw new IllegalArgumentException(message);
              }
          }
      }
docs: TODO support primitives