test_class.file: core/src/test/java/org/carrot2/attrs/AttrsTest.java
test_class.identifier: AttrsTest
test_class.superclass: extends TestBase
test_case.body: @Test
    public void testCustomDictionary() {
      class Entry implements AcceptingVisitor {
        String match;
        String[] tokens;
  
        @Override
        public void accept(AttrVisitor visitor) {
          AttrString a1 = AttrString.builder().defaultValue(match);
          visitor.visit("match", a1);
          this.match = a1.get();
  
          AttrStringArray a2 = AttrStringArray.builder().defaultValue(tokens);
          visitor.visit("tokens", a2);
          tokens = a2.get();
        }
      }
  
      class AdHocDict extends AttrComposite {
        List<Entry> entries;
  
        {
          attributes.register(
              "entries",
              AttrObjectArray.builder(Entry.class, () -> new Entry())
                  .getset(() -> entries, (list) -> entries = list)
                  .defaultValue(null));
        }
      }
  
      class Clazz extends AttrComposite {
        AdHocDict adHocDict = new AdHocDict();
  
        {
          attributes.register(
              "adhoc",
              AttrObject.builder(AdHocDict.class)
                  .getset(() -> adHocDict, (v) -> adHocDict = v)
                  .defaultValue(() -> new AdHocDict()));
        }
      }
  
      Entry entry = new Entry();
      entry.match = "e";
      entry.tokens = new String[] {"foo", "bar"};
  
      Clazz ob = new Clazz();
      ob.adHocDict.entries = Arrays.asList(entry, entry);
      System.out.println(Attrs.toJson(ob, JvmNameMapper.INSTANCE));
    }
test_case.class_method_signature: AttrsTest.testCustomDictionary()
test_case.full_signature: @Test public void testCustomDictionary()
test_case.identifier: testCustomDictionary
test_case.invocations: defaultValue builder visit get defaultValue builder visit get register defaultValue getset builder register defaultValue getset builder asList println toJson
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCustomDictionary()
focal_class.declarator: KEY_WRAPPED = "@value"
focal_class.modifier: private static final
focal_class.original_string: private static final String KEY_WRAPPED = "@value";
focal_class.type: String
focal_class.var_name: KEY_WRAPPED
focal_class.declarator: KEY_TYPE = "@type"
focal_class.modifier: static final
focal_class.original_string: static final String KEY_TYPE = "@type";
focal_class.type: String
focal_class.var_name: KEY_TYPE
focal_class.file: core/src/main/java/org/carrot2/attrs/Attrs.java
focal_class.identifier: Attrs
focal_class.class_method_signature: Attrs.toMap(AcceptingVisitor composite)
focal_class.full_signature: public static Map<String, Object> toMap(AcceptingVisitor composite)
focal_class.identifier: toMap
focal_class.modifiers: public static
focal_class.parameters: (AcceptingVisitor composite)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> toMap(AcceptingVisitor composite)
focal_class.class_method_signature: Attrs.toMap(
        AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.full_signature: public static Map<String, Object> toMap(
        AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.identifier: toMap
focal_class.modifiers: public static
focal_class.parameters: (
        AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> toMap(
        AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.class_method_signature: Attrs.fromMap(
        Class<? extends E> clazz, Map<String, Object> map)
focal_class.full_signature: public static E fromMap(
        Class<? extends E> clazz, Map<String, Object> map)
focal_class.identifier: fromMap
focal_class.modifiers: public static
focal_class.parameters: (
        Class<? extends E> clazz, Map<String, Object> map)
focal_class.return: E
focal_class.signature: E fromMap(
        Class<? extends E> clazz, Map<String, Object> map)
focal_class.class_method_signature: Attrs.fromMap(
        Class<? extends E> clazz, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.full_signature: public static E fromMap(
        Class<? extends E> clazz, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.identifier: fromMap
focal_class.modifiers: public static
focal_class.parameters: (
        Class<? extends E> clazz, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.return: E
focal_class.signature: E fromMap(
        Class<? extends E> clazz, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.class_method_signature: Attrs.extract(
        AcceptingVisitor instance, Function<Object, String> classToName)
focal_class.full_signature: public static Map<String, Object> extract(
        AcceptingVisitor instance, Function<Object, String> classToName)
focal_class.identifier: extract
focal_class.modifiers: public static
focal_class.parameters: (
        AcceptingVisitor instance, Function<Object, String> classToName)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> extract(
        AcceptingVisitor instance, Function<Object, String> classToName)
focal_class.class_method_signature: Attrs.extract(AcceptingVisitor instance)
focal_class.full_signature: public static Map<String, Object> extract(AcceptingVisitor instance)
focal_class.identifier: extract
focal_class.modifiers: public static
focal_class.parameters: (AcceptingVisitor instance)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> extract(AcceptingVisitor instance)
focal_class.class_method_signature: Attrs.populate(E instance, Map<String, Object> map)
focal_class.full_signature: public static E populate(E instance, Map<String, Object> map)
focal_class.identifier: populate
focal_class.modifiers: public static
focal_class.parameters: (E instance, Map<String, Object> map)
focal_class.return: E
focal_class.signature: E populate(E instance, Map<String, Object> map)
focal_class.class_method_signature: Attrs.populate(
        E instance, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.full_signature: public static E populate(
        E instance, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.identifier: populate
focal_class.modifiers: public static
focal_class.parameters: (
        E instance, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.return: E
focal_class.signature: E populate(
        E instance, Map<String, Object> map, Function<String, Object> nameToClass)
focal_class.class_method_signature: Attrs.toJson(AcceptingVisitor composite, ClassNameMapper classNameMapper)
focal_class.full_signature: public static String toJson(AcceptingVisitor composite, ClassNameMapper classNameMapper)
focal_class.identifier: toJson
focal_class.modifiers: public static
focal_class.parameters: (AcceptingVisitor composite, ClassNameMapper classNameMapper)
focal_class.return: String
focal_class.signature: String toJson(AcceptingVisitor composite, ClassNameMapper classNameMapper)
focal_class.class_method_signature: Attrs.toJson(AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.full_signature: public static String toJson(AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.identifier: toJson
focal_class.modifiers: public static
focal_class.parameters: (AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.return: String
focal_class.signature: String toJson(AcceptingVisitor composite, Function<Object, String> classToName)
focal_class.class_method_signature: Attrs.safeCast(Object value, String key, Class<T> clazz)
focal_class.full_signature: static T safeCast(Object value, String key, Class<T> clazz)
focal_class.identifier: safeCast
focal_class.modifiers: static
focal_class.parameters: (Object value, String key, Class<T> clazz)
focal_class.return: T
focal_class.signature: T safeCast(Object value, String key, Class<T> clazz)
focal_class.class_method_signature: Attrs.toDebugString(Object value)
focal_class.full_signature: static String toDebugString(Object value)
focal_class.identifier: toDebugString
focal_class.modifiers: static
focal_class.parameters: (Object value)
focal_class.return: String
focal_class.signature: String toDebugString(Object value)
focal_method.body: public static String toJson(AcceptingVisitor composite, ClassNameMapper classNameMapper) {
      return toJson(composite, classNameMapper::toName);
    }
focal_method.class_method_signature: Attrs.toJson(AcceptingVisitor composite, ClassNameMapper classNameMapper)
focal_method.full_signature: public static String toJson(AcceptingVisitor composite, ClassNameMapper classNameMapper)
focal_method.identifier: toJson
focal_method.invocations: toJson
focal_method.modifiers: public static
focal_method.parameters: (AcceptingVisitor composite, ClassNameMapper classNameMapper)
focal_method.return: String
focal_method.signature: String toJson(AcceptingVisitor composite, ClassNameMapper classNameMapper)