Schema implements Annotatable<Schema> { public Collection<GroupDef> getDynamicGroups(String name) { if (name == null) { return getGroups(); } LinkedList<GroupDef> subGroups = new LinkedList<>(); for (GroupDef group : sortedGroups) { if (isInstanceOf(name, group.getName())) { subGroups.add(group); } } return subGroups; } Schema(Collection<GroupDef> groups, Collection<NamedType> namedTypes);  Schema(Collection<GroupDef> groups, Collection<NamedType> namedTypes,
        SchemaBinding binding);  Schema(Collection<GroupDef> groups, Collection<NamedType> namedTypes,
                  Map<String, String> annotations, SchemaBinding binding);  Schema(Collection<GroupDef> groups, Collection<NamedType> namedTypes,
        Map<String, String> annotations, SchemaBinding binding, Map<Object,Integer> remappedClasses); SchemaBinding getBinding(); boolean isBound(); boolean isUnbound(); Schema unbind(); GroupDef resolveToGroup(TypeDef type); TypeDef resolveToType(TypeDef type, boolean full); Collection<NamedType> getNamedTypes(); GroupDef getGroup(Object groupType); GroupDef getGroup(String name); GroupDef getGroup(int id); Collection<GroupDef> getDynamicGroups(String name); boolean isInstanceOf(String groupToMatch, String groupName); Collection<GroupDef> getGroups(); Schema assignGroupIds(); Object getUID(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); MetaSchema toMessage(); @Override Schema replaceAnnotations(Annotations annotations); @Override Schema addAnnotations(Annotations annotations); @Override String getAnnotation(String name); @Override Map<String, String> getAnnotations(); void visit(SchemaVisitor sv); static Schema merge(Schema... schemasToMerge);  }
@Test public void testMultipleInheritance () { Schema schema = new SchemaBuilder().build(FooMessage.class, BarMessage.class, Bar2Message.class); Collection<GroupDef> groups = schema.getDynamicGroups("FooMessage"); for (GroupDef g : groups) { System.out.println(g.getName()); } assertEquals(3, groups.size()); }