private static CppBinary newCopy(CppBinary binary) {
    if (binary instanceof CppSharedLibrary) {
      return new CppSharedLibraryImpl((CppSharedLibrary)binary);
    }
    if (binary instanceof CppStaticLibrary) {
      return new CppStaticLibraryImpl((CppStaticLibrary)binary);
    }
    if (binary instanceof CppExecutable) {
      return new CppExecutableImpl((CppExecutable)binary);
    }
    return new CppBinaryImpl(binary);
  }
private static CppBinary newCopy(CppBinary binary)