vdl/codegen/java: Change veyrons in generated code.
Change-Id: Ie7d830b24b56c442e690833b285b0fe0d63e4666
diff --git a/lib/vdl/codegen/java/file_client_factory.go b/lib/vdl/codegen/java/file_client_factory.go
index ea2a8ef..ecb90e2 100644
--- a/lib/vdl/codegen/java/file_client_factory.go
+++ b/lib/vdl/codegen/java/file_client_factory.go
@@ -22,10 +22,10 @@
public static {{ .ServiceName }}Client bind(final java.lang.String name) {
return bind(name, null);
}
- public static {{ .ServiceName }}Client bind(final java.lang.String name, final io.v.v23.Options veyronOpts) {
+ public static {{ .ServiceName }}Client bind(final java.lang.String name, final io.v.v23.Options vOpts) {
io.v.v23.rpc.Client client = null;
- if (veyronOpts != null && veyronOpts.get(io.v.v23.OptionDefs.CLIENT) != null) {
- client = veyronOpts.get(io.v.v23.OptionDefs.CLIENT, io.v.v23.rpc.Client.class);
+ if (vOpts != null && vOpts.get(io.v.v23.OptionDefs.CLIENT) != null) {
+ client = vOpts.get(io.v.v23.OptionDefs.CLIENT, io.v.v23.rpc.Client.class);
}
return new {{ .StubName }}(client, name);
}
diff --git a/lib/vdl/codegen/java/file_client_interface.go b/lib/vdl/codegen/java/file_client_interface.go
index 46c66e2..e504708 100644
--- a/lib/vdl/codegen/java/file_client_interface.go
+++ b/lib/vdl/codegen/java/file_client_interface.go
@@ -33,7 +33,7 @@
{{/* Generate the method signature. */}}
{{ $method.Doc }}
{{ $method.AccessModifier }} {{ $method.RetType }} {{ $method.Name }}(final io.v.v23.context.VContext context{{ $method.Args }}) throws io.v.v23.verror.VException;
- {{ $method.AccessModifier }} {{ $method.RetType }} {{ $method.Name }}(final io.v.v23.context.VContext context{{ $method.Args }}, final io.v.v23.Options veyronOpts) throws io.v.v23.verror.VException;
+ {{ $method.AccessModifier }} {{ $method.RetType }} {{ $method.Name }}(final io.v.v23.context.VContext context{{ $method.Args }}, final io.v.v23.Options vOpts) throws io.v.v23.verror.VException;
{{ end }}
}
`
diff --git a/lib/vdl/codegen/java/file_client_stub.go b/lib/vdl/codegen/java/file_client_stub.go
index 8812f5b..9e3b6c4 100644
--- a/lib/vdl/codegen/java/file_client_stub.go
+++ b/lib/vdl/codegen/java/file_client_stub.go
@@ -20,7 +20,7 @@
/* Client stub for interface: {{ .ServiceName }}Client. */
{{ .AccessModifier }} final class {{ .ServiceName }}ClientStub implements {{ .FullServiceName }}Client {
private final io.v.v23.rpc.Client client;
- private final java.lang.String veyronName;
+ private final java.lang.String vName;
{{/* Define fields to hold each of the embedded object stubs*/}}
{{ range $embed := .Embeds }}
@@ -28,12 +28,12 @@
private final {{ $embed.StubClassName }} {{ $embed.LocalStubVarName }};
{{ end }}
- public {{ .ServiceName }}ClientStub(final io.v.v23.rpc.Client client, final java.lang.String veyronName) {
+ public {{ .ServiceName }}ClientStub(final io.v.v23.rpc.Client client, final java.lang.String vName) {
this.client = client;
- this.veyronName = veyronName;
+ this.vName = vName;
{{/* Initialize the embeded stubs */}}
{{ range $embed := .Embeds }}
- this.{{ $embed.LocalStubVarName }} = new {{ $embed.StubClassName }}(client, veyronName);
+ this.{{ $embed.LocalStubVarName }} = new {{ $embed.StubClassName }}(client, vName);
{{ end }}
}
@@ -49,9 +49,9 @@
// return getSignature(context, null);
//}
//@Override
- //public io.v.v23.rpc.ServiceSignature getSignature(io.v.v23.context.VContext context, io.v.v23.Options veyronOpts) throws io.v.v23.verror.VException {
+ //public io.v.v23.rpc.ServiceSignature getSignature(io.v.v23.context.VContext context, io.v.v23.Options vOpts) throws io.v.v23.verror.VException {
// // Start the call.
- // final io.v.v23.rpc.Client.Call _call = getClient(context).startCall(context, this.veyronName, "signature", new java.lang.Object[0], new java.lang.reflect.Type[0], veyronOpts);
+ // final io.v.v23.rpc.Client.Call _call = getClient(context).startCall(context, this.vName, "signature", new java.lang.Object[0], new java.lang.reflect.Type[0], vOpts);
// // Finish the call.
// final java.lang.reflect.Type[] _resultTypes = new java.lang.reflect.Type[]{
@@ -71,12 +71,12 @@
}
{{/* The main client stub method body */}}
@Override
- {{ $method.AccessModifier }} {{ $method.RetType }} {{ $method.Name }}(final io.v.v23.context.VContext context{{ $method.DeclarationArgs }}, io.v.v23.Options veyronOpts) throws io.v.v23.verror.VException {
- {{/* Start the veyron call */}}
+ {{ $method.AccessModifier }} {{ $method.RetType }} {{ $method.Name }}(final io.v.v23.context.VContext context{{ $method.DeclarationArgs }}, io.v.v23.Options vOpts) throws io.v.v23.verror.VException {
+ {{/* Start the vanadium call */}}
// Start the call.
final java.lang.Object[] _args = new java.lang.Object[]{ {{ $method.CallingArgs }} };
final java.lang.reflect.Type[] _argTypes = new java.lang.reflect.Type[]{ {{ $method.CallingArgTypes }} };
- final io.v.v23.rpc.Client.Call _call = getClient(context).startCall(context, this.veyronName, "{{ $method.Name }}", _args, _argTypes, veyronOpts);
+ final io.v.v23.rpc.Client.Call _call = getClient(context).startCall(context, this.vName, "{{ $method.Name }}", _args, _argTypes, vOpts);
// Finish the call.
{{/* Now handle returning from the function. */}}
@@ -147,9 +147,9 @@
{{ if $eMethod.Returns }}return{{ end }} this.{{ $eMethod.LocalStubVarName }}.{{ $eMethod.Name }}(context{{ $eMethod.CallingArgsLeadingComma }});
}
@Override
- {{ $eMethod.AccessModifier }} {{ $eMethod.RetType }} {{ $eMethod.Name }}(final io.v.v23.context.VContext context{{ $eMethod.DeclarationArgs }}, io.v.v23.Options veyronOpts) throws io.v.v23.verror.VException {
+ {{ $eMethod.AccessModifier }} {{ $eMethod.RetType }} {{ $eMethod.Name }}(final io.v.v23.context.VContext context{{ $eMethod.DeclarationArgs }}, io.v.v23.Options vOpts) throws io.v.v23.verror.VException {
{{/* e.g. return this.stubArith.cosine(context, [args], options) */}}
- {{ if $eMethod.Returns }}return{{ end }} this.{{ $eMethod.LocalStubVarName }}.{{ $eMethod.Name }}(context{{ $eMethod.CallingArgsLeadingComma }}, veyronOpts);
+ {{ if $eMethod.Returns }}return{{ end }} this.{{ $eMethod.LocalStubVarName }}.{{ $eMethod.Name }}(context{{ $eMethod.CallingArgsLeadingComma }}, vOpts);
}
{{ end }}
diff --git a/lib/vdl/codegen/java/file_server_interface.go b/lib/vdl/codegen/java/file_server_interface.go
index 6171295..6a9d3fc 100644
--- a/lib/vdl/codegen/java/file_server_interface.go
+++ b/lib/vdl/codegen/java/file_server_interface.go
@@ -19,7 +19,7 @@
package {{ .PackagePath }};
{{ .ServerDoc }}
-@io.v.v23.vdl.VeyronServer(
+@io.v.v23.vdl.VServer(
serverWrapper = {{ .ServerWrapperPath }}.class
)
{{ .AccessModifier }} interface {{ .ServiceName }}Server {{ .Extends }} {
diff --git a/lib/vdl/codegen/java/file_server_wrapper.go b/lib/vdl/codegen/java/file_server_wrapper.go
index 75b7222..e461085 100644
--- a/lib/vdl/codegen/java/file_server_wrapper.go
+++ b/lib/vdl/codegen/java/file_server_wrapper.go
@@ -40,7 +40,7 @@
* Returns a description of this server.
*/
public io.v.v23.vdlroot.signature.Interface signature() throws io.v.v23.verror.VException {
- java.util.List<io.v.v23.vdlroot.signature.Embed> embeds = new java.util.ArrayList<io.v.v23.vdlroot.signature.Embed>();
+ java.util.List<io.v.v23.vdlroot.signature.Embed> embeds = new java.util.ArrayList<io.v.v23.vdlroot.signature.Embed>();
java.util.List<io.v.v23.vdlroot.signature.Method> methods = new java.util.ArrayList<io.v.v23.vdlroot.signature.Method>();
{{ range $method := .Methods }}
{