use of com.google.api.codegen.util.NamePath in project toolkit by googleapis.
the class JavaSurfaceNamer method getGrpcServiceClassName.
/**
* The type name of the Grpc service class This needs to match what Grpc generates for the
* particular language.
*/
@Override
public String getGrpcServiceClassName(InterfaceModel apiInterface) {
String fullName = JavaModelTypeNameConverter.getGrpcTypeName(((ProtoInterfaceModel) apiInterface).getInterface()).getFullName();
NamePath namePath = getTypeNameConverter().getNamePath(fullName);
String grpcContainerName = publicClassName(Name.upperCamelKeepUpperAcronyms(namePath.getHead(), "Grpc"));
String serviceClassName = publicClassName(Name.upperCamelKeepUpperAcronyms(apiInterface.getSimpleName(), "ImplBase"));
return qualifiedName(namePath.withHead(grpcContainerName).append(serviceClassName));
}
use of com.google.api.codegen.util.NamePath in project toolkit by googleapis.
the class SurfaceNamer method getGrpcContainerTypeName.
/**
* The type name of the Grpc container class. This needs to match what Grpc generates for the
* particular language.
*/
public String getGrpcContainerTypeName(InterfaceModel apiInterface) {
NamePath namePath = typeNameConverter.getNamePath(getTypeFormatter().getFullNameFor(apiInterface));
String publicClassName = publicClassName(Name.upperCamelKeepUpperAcronyms(namePath.getHead(), "Grpc"));
return qualifiedName(namePath.withHead(publicClassName));
}
use of com.google.api.codegen.util.NamePath in project toolkit by googleapis.
the class SurfaceNamer method getGrpcServiceClassName.
/**
* The type name of the Grpc service class This needs to match what Grpc generates for the
* particular language.
*/
public String getGrpcServiceClassName(InterfaceModel apiInterface) {
NamePath namePath = typeNameConverter.getNamePath(getTypeFormatter().getFullNameFor(apiInterface));
String grpcContainerName = publicClassName(Name.upperCamelKeepUpperAcronyms(namePath.getHead(), "Grpc"));
String serviceClassName = publicClassName(Name.upperCamelKeepUpperAcronyms(apiInterface.getSimpleName(), "ImplBase"));
return qualifiedName(namePath.withHead(grpcContainerName).append(serviceClassName));
}
use of com.google.api.codegen.util.NamePath in project toolkit by googleapis.
the class PhpSurfaceNamer method getGrpcClientTypeName.
private NamePath getGrpcClientTypeName(InterfaceModel apiInterface, String suffix) {
NamePath namePath = getTypeNameConverter().getNamePath(getModelTypeFormatter().getFullNameFor(apiInterface));
String publicClassName = publicClassName(Name.upperCamelKeepUpperAcronyms(namePath.getHead(), suffix));
return namePath.withHead(publicClassName);
}
use of com.google.api.codegen.util.NamePath in project toolkit by googleapis.
the class JavaSurfaceNamer method getGrpcContainerTypeName.
/**
* The type name of the Grpc container class. This needs to match what Grpc generates for the
* particular language.
*/
public String getGrpcContainerTypeName(InterfaceModel apiInterface) {
String fullName = JavaModelTypeNameConverter.getGrpcTypeName(((ProtoInterfaceModel) apiInterface).getInterface()).getFullName();
NamePath namePath = getTypeNameConverter().getNamePath(fullName);
String publicClassName = publicClassName(Name.upperCamelKeepUpperAcronyms(namePath.getHead(), "Grpc"));
return qualifiedName(namePath.withHead(publicClassName));
}
Aggregations