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 testAdditionalClassesToOutput() {
          ServiceModel model = serviceClassParser.parseServiceClass(TestServiceClass.class, settings);
          ServiceEmitter serviceEmitter = new ServiceEmitter(model, settings, writer);
          serviceEmitter.emitTypescriptTypes(settings, Lists.newArrayList(MyObject.class));
          writer.close();
          String expectedOutput = "\n" +
  "    export interface MyObject {\n" +
  "        y: MyObject;\n" +
  "    }\n\n\n    // Added by 'EnumConstantsExtension' extension\n";
          assertEquals(expectedOutput, new String(stream.toByteArray()));
      }
test_case.class_method_signature: ServiceEmitterTest.testAdditionalClassesToOutput()
test_case.full_signature: @Test public void testAdditionalClassesToOutput()
test_case.identifier: testAdditionalClassesToOutput
test_case.invocations: parseServiceClass emitTypescriptTypes newArrayList close assertEquals toByteArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAdditionalClassesToOutput()
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 emitTypescriptTypes(TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput) {
          Settings settingsToUse = settings.getSettings();
          TypeProcessor baseTypeProcessor = settingsToUse.customTypeProcessor;
  
          Set<Type> referencedTypes = Sets.newHashSet(model.referencedTypes().iterator());
          referencedTypes.addAll(additionalTypesToOutput);
          Set<Class<?>> referencedClasses = getReferencedClasses(referencedTypes, settings);
          final Set<Type> discoveredTypes = Sets.newHashSet(referencedClasses.iterator());
          referencedClasses = filterInputClasses(referencedClasses);
          TypeProcessor discoveringProcessor = new TypeProcessor() {
              @Override
              public Result processType(Type javaType, Context context) {
                  discoveredTypes.add(javaType);
                  return null;
              }
          };
  
          settingsToUse.customTypeProcessor = discoveringProcessor;
          if (baseTypeProcessor != null) {
              settingsToUse.customTypeProcessor = new TypeProcessor.Chain(discoveringProcessor, baseTypeProcessor);
          }
  
          TypeScriptGenerator typescriptGenerator = new TypeScriptGenerator(settingsToUse);
          ByteArrayOutputStream typeDeclarations = new ByteArrayOutputStream();
          Type[] types = new Type[referencedClasses.size()];
          referencedClasses.toArray(types);
          int intendationLevel = 1;
          if (!settings.typescriptModule().isPresent()) {
          	intendationLevel = 0;
          }
          typescriptGenerator.generateEmbeddableTypeScript(Input.from(types), Output.to(typeDeclarations), true, intendationLevel);
          writer.write(new String(typeDeclarations.toByteArray()));
      }
focal_method.class_method_signature: ServiceEmitter.emitTypescriptTypes(TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)
focal_method.full_signature: public void emitTypescriptTypes(TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)
focal_method.identifier: emitTypescriptTypes
focal_method.invocations: getSettings newHashSet iterator referencedTypes addAll getReferencedClasses newHashSet iterator filterInputClasses add size toArray isPresent typescriptModule generateEmbeddableTypeScript from to write toByteArray
focal_method.modifiers: public
focal_method.parameters: (TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)
focal_method.return: void
focal_method.signature: void emitTypescriptTypes(TypescriptServiceGeneratorConfiguration settings, List<Type> additionalTypesToOutput)