private static ClassHierarchyProto.ConstructorDef serializeConstructorDef(ConstructorDef<?> def) {
   List<ClassHierarchyProto.ConstructorArg> args = new ArrayList<>();
   for (ConstructorArg arg : def.getArgs()) {
     args.add(
         newConstructorArg(arg.getType(), arg.getNamedParameterName(), arg.isInjectionFuture()));
   }
   return newConstructorDef(def.getClassName(), args);
 }