/** The class name of the mock gRPC service implementation for the given API interface. */ public String getMockGrpcServiceImplName(InterfaceModel apiInterface) { return publicClassName( Name.upperCamelKeepUpperAcronyms("Mock", apiInterface.getSimpleName(), "Impl")); }
/** The name of the function that will create a stub. */ public String getCreateStubFunctionName(InterfaceModel apiInterface) { return privateMethodName( Name.upperCamel("Create", apiInterface.getSimpleName(), "Stub", "Function")); }
@Override public String getApiWrapperClassConstructorName(InterfaceConfig interfaceConfig) { return publicFieldName( Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName(), "Client")); }
/** The type name of call options */ public String getCallSettingsTypeName(InterfaceConfig interfaceConfig) { return publicClassName( Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName(), "Settings")); }
@Override public String getPackageServiceName(InterfaceConfig interfaceConfig) { return getReducedServiceName(interfaceConfig.getInterfaceModel().getSimpleName()) .toLowerCamel(); }
/** * The name of the constructor for the interfaceConfig.getInterfaceModel() client. The client is * VKit generated, not GRPC. */ public String getApiWrapperClassConstructorName(InterfaceConfig interfaceConfig) { return publicClassName( Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName(), "Client")); }
/** The name of the class that implements snippets for a particular proto interface. */ @Override public String getApiSnippetsClassName(InterfaceConfig interfaceConfig) { return publicClassName( Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName(), "ClientSnippets")); }
/** The function name to retrieve default call option */ public String getDefaultCallSettingsFunctionName(InterfaceConfig interfaceConfig) { return publicMethodName( Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName(), "Settings")); }
/** The name of the class that implements snippets for a particular proto interface. */ public String getApiSnippetsClassName(InterfaceConfig interfaceConfig) { return publicClassName( Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName(), "ApiSnippets")); }
/** The name of the example for the method. */ public String getApiMethodExampleName(InterfaceConfig interfaceConfig, MethodModel method) { return getApiMethodName( Name.anyCamel(interfaceConfig.getInterfaceModel().getSimpleName()), VisibilityConfig.PUBLIC); }
@Override public String getClientConfigPath(InterfaceConfig interfaceConfig) { return Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName()) .join("client_config") .toLowerUnderscore(); }
/** The name of the RPC stub for a particular proto interface; not used in most languages. */ public String getApiRpcStubClassName( InterfaceModel interfaceModel, TransportProtocol transportProtocol) { return publicClassName( getTransportProtocolName(transportProtocol) .join(Name.anyCamel(interfaceModel.getSimpleName(), "Stub"))); }
@Override public String getClientConfigPath(InterfaceConfig interfaceConfig) { return "/../resources/" + Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName()) .join("client_config") .toLowerUnderscore() + ".json"; }
public String getClientFileName(InterfaceConfig interfaceConfig) { return Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName()) .join("client") .toLowerUnderscore(); }
@Override public String getClientConfigPath(InterfaceConfig interfaceConfig) { return Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName()) .join("client_config") .toLowerUnderscore() + ".json"; }
@Override public String getClientConfigName(InterfaceConfig interfaceConfig) { return classFileNameBase( Name.upperCamel(interfaceConfig.getInterfaceModel().getSimpleName()).join("client_config")); }
@Override public String getServiceFileName(InterfaceConfig interfaceConfig) { return classFileNameBase( getReducedServiceName(interfaceConfig.getInterfaceModel().getSimpleName()).join("client")); }
@Override public String getMockGrpcServiceImplName(InterfaceModel apiInterface) { return privateClassName( Name.from("mock").join(getReducedServiceName(apiInterface.getSimpleName()).join("server"))); }
@Override public String getApiWrapperClassConstructorName(InterfaceConfig interfaceConfig) { return publicMethodName( Name.from("new") .join(clientNamePrefix(interfaceConfig.getInterfaceModel().getSimpleName())) .join("client")); }
@Override public String getExampleFileName(InterfaceConfig interfaceConfig) { return classFileNameBase( getReducedServiceName(interfaceConfig.getInterfaceModel().getSimpleName()) .join("client") .join("example") .join("test")); }