test_class.declarator: settings
test_class.modifier: private
test_class.original_string: private TypescriptServiceGeneratorConfiguration settings;
test_class.type: TypescriptServiceGeneratorConfiguration
test_class.var_name: settings
test_class.declarator: writer
test_class.modifier: private
test_class.original_string: private IndentedOutputWriter writer;
test_class.type: IndentedOutputWriter
test_class.var_name: writer
test_class.declarator: stream
test_class.modifier: private
test_class.original_string: private ByteArrayOutputStream stream;
test_class.type: ByteArrayOutputStream
test_class.var_name: stream
test_class.declarator: serviceClassParser
test_class.modifier: private
test_class.original_string: private ServiceClassParser serviceClassParser;
test_class.type: ServiceClassParser
test_class.var_name: serviceClassParser
test_class.file: typescript-service-generator-core/src/test/java/com/palantir/code/ts/generator/ServiceEmitterTest.java
test_class.identifier: ServiceEmitterTest
test_case.body: @Test
      public void testDuplicateMethodInterface() {
          ServiceModel model = serviceClassParser.parseServiceClass(DuplicateMethodNamesService.class, settings);
          ServiceEmitter serviceEmitter = new ServiceEmitter(model, settings, writer);
          serviceEmitter.emitTypescriptInterface();
          writer.close();
          String expectedOutput = "\n" +
  "export interface DuplicateMethodNamesService {\n" +
  "\n" +
  "    // WARNING: not creating method declaration, java service has multiple methods with the name duplicate\n" +
  "}\n";
          assertEquals(expectedOutput, new String(stream.toByteArray()));
      }
test_case.class_method_signature: ServiceEmitterTest.testDuplicateMethodInterface()
test_case.full_signature: @Test public void testDuplicateMethodInterface()
test_case.identifier: testDuplicateMethodInterface
test_case.invocations: parseServiceClass emitTypescriptInterface close assertEquals toByteArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDuplicateMethodInterface()
focal_class.declarator: OBJECT_MAPPER = new ObjectMapper()
focal_class.modifier: private static final
focal_class.original_string: private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
focal_class.type: ObjectMapper
focal_class.var_name: OBJECT_MAPPER
focal_class.declarator: model
focal_class.modifier: private final
focal_class.original_string: private final ServiceModel model;
focal_class.type: ServiceModel
focal_class.var_name: model
focal_class.declarator: settings
focal_class.modifier: private final
focal_class.original_string: private final TypescriptServiceGeneratorConfiguration settings;
focal_class.type: TypescriptServiceGeneratorConfiguration
focal_class.var_name: settings
focal_class.declarator: writer
focal_class.modifier: private final
focal_class.original_string: private final IndentedOutputWriter writer;
focal_class.type: IndentedOutputWriter
focal_class.var_name: writer
focal_class.file: typescript-service-generator-core/src/main/java/com/palantir/code/ts/generator/ServiceEmitter.java
focal_class.identifier: ServiceEmitter
focal_class.class_method_signature: ServiceEmitter.ServiceEmitter(ServiceModel model, TypescriptServiceGeneratorConfiguration settings, IndentedOutputWriter writer)
focal_class.full_signature: public  ServiceEmitter(ServiceModel model, TypescriptServiceGeneratorConfiguration settings, IndentedOutputWriter writer)
focal_class.identifier: ServiceEmitter
focal_class.modifiers: public
focal_class.parameters: (ServiceModel model, TypescriptServiceGeneratorConfiguration settings, IndentedOutputWriter writer)
focal_class.signature:  ServiceEmitter(ServiceModel model, TypescriptServiceGeneratorConfiguration settings, IndentedOutputWriter writer)
focal_class.class_method_signature: ServiceEmitter.emitTypescriptTypes(TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)
focal_class.full_signature: public void emitTypescriptTypes(TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)
focal_class.identifier: emitTypescriptTypes
focal_class.modifiers: public
focal_class.parameters: (TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)
focal_class.return: void
focal_class.signature: void emitTypescriptTypes(TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)
focal_class.class_method_signature: ServiceEmitter.emitTypescriptClass()
focal_class.full_signature: public void emitTypescriptClass()
focal_class.identifier: emitTypescriptClass
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void emitTypescriptClass()
focal_class.class_method_signature: ServiceEmitter.emitTypescriptInterface()
focal_class.full_signature: public void emitTypescriptInterface()
focal_class.identifier: emitTypescriptInterface
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void emitTypescriptInterface()
focal_class.class_method_signature: ServiceEmitter.getDuplicateEndpointNames()
focal_class.full_signature: private Set<String> getDuplicateEndpointNames()
focal_class.identifier: getDuplicateEndpointNames
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getDuplicateEndpointNames()
focal_class.class_method_signature: ServiceEmitter.getEndpointPathString(InnerServiceModel model, ServiceEndpointModel endpointModel)
focal_class.full_signature: private String getEndpointPathString(InnerServiceModel model, ServiceEndpointModel endpointModel)
focal_class.identifier: getEndpointPathString
focal_class.modifiers: private
focal_class.parameters: (InnerServiceModel model, ServiceEndpointModel endpointModel)
focal_class.return: String
focal_class.signature: String getEndpointPathString(InnerServiceModel model, ServiceEndpointModel endpointModel)
focal_class.class_method_signature: ServiceEmitter.getEndpointParametersString(ServiceEndpointModel endpointModel)
focal_class.full_signature: private String getEndpointParametersString(ServiceEndpointModel endpointModel)
focal_class.identifier: getEndpointParametersString
focal_class.modifiers: private
focal_class.parameters: (ServiceEndpointModel endpointModel)
focal_class.return: String
focal_class.signature: String getEndpointParametersString(ServiceEndpointModel endpointModel)
focal_class.class_method_signature: ServiceEmitter.filterInputClasses(Set<Class<?>> referencedClasses)
focal_class.full_signature: private Set<Class<?>> filterInputClasses(Set<Class<?>> referencedClasses)
focal_class.identifier: filterInputClasses
focal_class.modifiers: private
focal_class.parameters: (Set<Class<?>> referencedClasses)
focal_class.return: Set<Class<?>>
focal_class.signature: Set<Class<?>> filterInputClasses(Set<Class<?>> referencedClasses)
focal_class.class_method_signature: ServiceEmitter.getReferencedClasses(Set<Type> referencedTypes, TypescriptServiceGeneratorConfiguration settings)
focal_class.full_signature: public static Set<Class<?>> getReferencedClasses(Set<Type> referencedTypes, TypescriptServiceGeneratorConfiguration settings)
focal_class.identifier: getReferencedClasses
focal_class.modifiers: public static
focal_class.parameters: (Set<Type> referencedTypes, TypescriptServiceGeneratorConfiguration settings)
focal_class.return: Set<Class<?>>
focal_class.signature: Set<Class<?>> getReferencedClasses(Set<Type> referencedTypes, TypescriptServiceGeneratorConfiguration settings)
focal_class.class_method_signature: ServiceEmitter.optionalToString(Optional<T> payload)
focal_class.full_signature: private static String optionalToString(Optional<T> payload)
focal_class.identifier: optionalToString
focal_class.modifiers: private static
focal_class.parameters: (Optional<T> payload)
focal_class.return: String
focal_class.signature: String optionalToString(Optional<T> payload)
focal_method.body: public void emitTypescriptInterface() {
          Set<String> endpointsToWarnAboutDuplicateNames = Sets.newHashSet();
          if (!this.settings.emitDuplicateJavaMethodNames()) {
              endpointsToWarnAboutDuplicateNames = getDuplicateEndpointNames();
          }
  
          writer.writeLine("");
          writer.writeLine("export interface " + settings.getSettings().addTypeNamePrefix + model.name() + " {");
          writer.increaseIndent();
  
          for (InnerServiceModel innerServiceModel : model.innerServiceModels()) {
              if (model.innerServiceModels().size() > 1) {
                  writer.writeLine("");
                  writer.writeLine("// endpoints for service class: " + innerServiceModel.name());
              }
  
              for (ServiceEndpointModel endpointModel: innerServiceModel.endpointModels()) {
                  if (!endpointsToWarnAboutDuplicateNames.contains(endpointModel.endpointName())) {
                      String line = endpointModel.endpointName() + "(";
                      line += getEndpointParametersString(endpointModel);
                      line += String.format("): " + settings.genericEndpointReturnType(), endpointModel.tsReturnType().toString()) + ";";
                      writer.writeLine(line);
                  }
              }
          }
          if (!endpointsToWarnAboutDuplicateNames.isEmpty()) {
              writer.writeLine("");
          }
          for (String endpointName : endpointsToWarnAboutDuplicateNames) {
              writer.writeLine(String.format("// WARNING: not creating method declaration, java service has multiple methods with the name %s", endpointName));
          }
  
          writer.decreaseIndent();
          writer.writeLine("}");
      }
focal_method.class_method_signature: ServiceEmitter.emitTypescriptInterface()
focal_method.full_signature: public void emitTypescriptInterface()
focal_method.identifier: emitTypescriptInterface
focal_method.invocations: newHashSet emitDuplicateJavaMethodNames getDuplicateEndpointNames writeLine writeLine getSettings name increaseIndent innerServiceModels size innerServiceModels writeLine writeLine name endpointModels contains endpointName endpointName getEndpointParametersString format genericEndpointReturnType toString tsReturnType writeLine isEmpty writeLine writeLine format decreaseIndent writeLine
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void emitTypescriptInterface()