String serializationPolicyFileName = SerializationPolicyLoader.getSerializationPolicyFileName(serializationPolicyName);
OutputStream os = ctx.tryCreateResource(logger,
serializationPolicyFileName);
if (os != null) {
os.write(serializationPolicyFileContents);
GeneratedResource resource = ctx.commitResource(logger, os);
/*
* Record which proxy class created the resource. A manifest will be
* emitted by the RpcPolicyManifestLinker.
*/
emitPolicyFileArtifact(logger, ctx, resource.getPartialPath());
} else {
logger.log(TreeLogger.TRACE,
"SerializationPolicy file for RemoteService '"
+ serviceIntf.getQualifiedSourceName()
+ "' already exists; no need to rewrite it.", null);