@Override
  public JVMClassNode<? extends JVMClassNode<?, ?>, ? extends Proto.Diff<? extends JVMClassNode<?, ?>>> getResult() {
    JVMFlags flags = new JVMFlags(myAccess);
    if (myLocalClassFlag.get()) {
      flags = flags.deriveIsLocal();
    }
    if (myAnonymousClassFlag.get()) {
      flags = flags.deriveIsAnonymous();
    }
    if (mySealedClassFlag.get()) {
      flags = flags.deriveIsSealed();
    }
    if (myIsGenerated) {
      flags = flags.deriveIsGenerated();
    }
    
    if (myIsModule) {
      for (ModuleUsage usage : Iterators.map(Iterators.filter(myModuleRequires, r -> !Objects.equals(myName, r.getName())), r -> new ModuleUsage(r.getName()))) {
        addUsage(usage);
      }
      return new JvmModule(flags, myName, myFileName, myVersion, myModuleRequires, myModuleExports, myUsages, myMetadata);
    }

    for (Usage usage : Iterators.flat(new TypeRepr.ClassType(mySuperClass).getUsages(), Iterators.flat(Iterators.map(myInterfaces, s -> new TypeRepr.ClassType(s).getUsages())))) {
      addUsage(usage);
    }
    for (Usage usage : Iterators.flat(Iterators.map(myFields, f -> f.getType().getUsages()))) {
      addUsage(usage);
    }
    for (JvmMethod jvmMethod : myMethods) {
      for (Usage usage : jvmMethod.getType().getUsages()) {
        addUsage(usage);
      }
      for (Usage usage : Iterators.flat(Iterators.map(jvmMethod.getArgTypes(), t -> t.getUsages()))) {
        addUsage(usage);
      }
      for (Usage usage : Iterators.flat(Iterators.map(jvmMethod.getExceptions(), t -> t.getUsages()))) {
        addUsage(usage);
      }
    }
    
    return new JvmClass(flags, mySignature, myName, myFileName, mySuperClass, myOuterClassName.get(), myInterfaces, myFields, myMethods, myAnnotations, myTargets, myRetentionPolicy, myUsages, myMetadata);
  }
@Override
  public JVMClassNode<? extends JVMClassNode<?, ?>, ? extends Proto.Diff<? extends JVMClassNode<?, ?>>> getResult()