test_class.declarator: PACKAGE_NAME = "com.truecaller.androidactors"
test_class.modifier: private static final
test_class.original_string: private static final String PACKAGE_NAME = "com.truecaller.androidactors";
test_class.type: String
test_class.var_name: PACKAGE_NAME
test_class.declarator: BUILDER_CLASS_NAME = "TestPackageGenerator"
test_class.modifier: private static final
test_class.original_string: private static final String BUILDER_CLASS_NAME = "TestPackageGenerator";
test_class.type: String
test_class.var_name: BUILDER_CLASS_NAME
test_class.declarator: mDescription
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ActorsPackageDescription mDescription;
test_class.type: ActorsPackageDescription
test_class.var_name: mDescription
test_class.file: generator/src/test/java/com/truecaller/androidactors/ActorsPackageGeneratedTest.java
test_class.identifier: ActorsPackageGeneratedTest
test_case.body: @Test
      public void generate_validPackageLevel_withProxies() {
          ActorsPackageGenerated generated = new ActorsPackageGenerated(mDescription);
          List<ActorInterfaceGenerated> proxies = new ArrayList<>();
          proxies.add(createProxy("com.truecaller.androidactors", "TestProxy"));
          JavaFile file = generated.generate(proxies);
          Assert.assertEquals(PACKAGE_NAME, file.packageName);
  
          verifyClass(file.typeSpec, false);
  
          ClassName self = ClassName.get(file.packageName, file.typeSpec.name);
  
          TypeSpec cls = file.typeSpec;
          verifyErrorHandlerField(cls.fieldSpecs);
          verifyProxyFactoryField(cls.fieldSpecs);
  
          verifyErrorHandlerSetter(self, cls.methodSpecs);
          verifyProxyFactorySetter(self, cls.methodSpecs);
          verifyBuildMethod(cls.methodSpecs);
  
          verifyProxyFactoryClass(cls.typeSpecs);
      }
test_case.class_method_signature: ActorsPackageGeneratedTest.generate_validPackageLevel_withProxies()
test_case.full_signature: @Test public void generate_validPackageLevel_withProxies()
test_case.identifier: generate_validPackageLevel_withProxies
test_case.invocations: add createProxy generate assertEquals verifyClass get verifyErrorHandlerField verifyProxyFactoryField verifyErrorHandlerSetter verifyProxyFactorySetter verifyBuildMethod verifyProxyFactoryClass
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void generate_validPackageLevel_withProxies()
focal_class.declarator: FIELD_ERROR_HANDLER = "mFailureHandler"
focal_class.modifier: static final
focal_class.original_string: static final String FIELD_ERROR_HANDLER = "mFailureHandler";
focal_class.type: String
focal_class.var_name: FIELD_ERROR_HANDLER
focal_class.declarator: FIELD_PROXY_FACTORY = "mProxyFactory"
focal_class.modifier: static final
focal_class.original_string: static final String FIELD_PROXY_FACTORY = "mProxyFactory";
focal_class.type: String
focal_class.var_name: FIELD_PROXY_FACTORY
focal_class.declarator: METHOD_SET_ERROR_HANDLER = "setFailureHandler"
focal_class.modifier: static final
focal_class.original_string: static final String METHOD_SET_ERROR_HANDLER = "setFailureHandler";
focal_class.type: String
focal_class.var_name: METHOD_SET_ERROR_HANDLER
focal_class.declarator: METHOD_SET_PROXY_FACTORY = "setProxyFactory"
focal_class.modifier: static final
focal_class.original_string: static final String METHOD_SET_PROXY_FACTORY = "setProxyFactory";
focal_class.type: String
focal_class.var_name: METHOD_SET_PROXY_FACTORY
focal_class.declarator: METHOD_BUILD = "build"
focal_class.modifier: static final
focal_class.original_string: static final String METHOD_BUILD = "build";
focal_class.type: String
focal_class.var_name: METHOD_BUILD
focal_class.declarator: CLASS_PROXY_FACTORY = "ProxyFactoryImpl"
focal_class.modifier: static final
focal_class.original_string: static final String CLASS_PROXY_FACTORY = "ProxyFactoryImpl";
focal_class.type: String
focal_class.var_name: CLASS_PROXY_FACTORY
focal_class.declarator: mPackageName
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final String mPackageName;
focal_class.type: String
focal_class.var_name: mPackageName
focal_class.declarator: mClassName
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final String mClassName;
focal_class.type: String
focal_class.var_name: mClassName
focal_class.declarator: mAccessLevel
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final ActorsPackage.AccessLevel mAccessLevel;
focal_class.type: ActorsPackage.AccessLevel
focal_class.var_name: mAccessLevel
focal_class.file: generator/src/main/java/com/truecaller/androidactors/ActorsPackageGenerated.java
focal_class.identifier: ActorsPackageGenerated
focal_class.interfaces: implements ActorsPackageGenerator
focal_class.class_method_signature: ActorsPackageGenerated.ActorsPackageGenerated(@NotNull ActorsPackageDescription description)
focal_class.full_signature:   ActorsPackageGenerated(@NotNull ActorsPackageDescription description)
focal_class.identifier: ActorsPackageGenerated
focal_class.parameters: (@NotNull ActorsPackageDescription description)
focal_class.signature:  ActorsPackageGenerated(@NotNull ActorsPackageDescription description)
focal_class.class_method_signature: ActorsPackageGenerated.generate(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_class.full_signature: @NotNull @Override public JavaFile generate(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_class.identifier: generate
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_class.return: JavaFile
focal_class.signature: JavaFile generate(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_class.class_method_signature: ActorsPackageGenerated.generateHandlerSetter(@NotNull ClassName builderClass)
focal_class.full_signature: @NotNull private MethodSpec generateHandlerSetter(@NotNull ClassName builderClass)
focal_class.identifier: generateHandlerSetter
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull ClassName builderClass)
focal_class.return: MethodSpec
focal_class.signature: MethodSpec generateHandlerSetter(@NotNull ClassName builderClass)
focal_class.class_method_signature: ActorsPackageGenerated.generateProxyFactorySetter(@NotNull ClassName builderClass)
focal_class.full_signature: @NotNull private MethodSpec generateProxyFactorySetter(@NotNull ClassName builderClass)
focal_class.identifier: generateProxyFactorySetter
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull ClassName builderClass)
focal_class.return: MethodSpec
focal_class.signature: MethodSpec generateProxyFactorySetter(@NotNull ClassName builderClass)
focal_class.class_method_signature: ActorsPackageGenerated.generateBuild(@NonNull TypeSpec threads, @NonNull TypeSpec factory, @NonNull TypeName handler)
focal_class.full_signature: @NotNull private MethodSpec generateBuild(@NonNull TypeSpec threads, @NonNull TypeSpec factory, @NonNull TypeName handler)
focal_class.identifier: generateBuild
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NonNull TypeSpec threads, @NonNull TypeSpec factory, @NonNull TypeName handler)
focal_class.return: MethodSpec
focal_class.signature: MethodSpec generateBuild(@NonNull TypeSpec threads, @NonNull TypeSpec factory, @NonNull TypeName handler)
focal_class.class_method_signature: ActorsPackageGenerated.generateThreadsClass()
focal_class.full_signature: @NotNull private TypeSpec generateThreadsClass()
focal_class.identifier: generateThreadsClass
focal_class.modifiers: @NotNull private
focal_class.parameters: ()
focal_class.return: TypeSpec
focal_class.signature: TypeSpec generateThreadsClass()
focal_class.class_method_signature: ActorsPackageGenerated.generateProxyFactory(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_class.full_signature: @NotNull private TypeSpec generateProxyFactory(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_class.identifier: generateProxyFactory
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_class.return: TypeSpec
focal_class.signature: TypeSpec generateProxyFactory(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_method.body: @NotNull
      @Override
      public JavaFile generate(@NonNull List<? extends ActorInterfaceGenerated> interfaces) {
          final ClassName builderClass = ClassName.get(mPackageName, mClassName);
          final TypeSpec.Builder builder = TypeSpec.classBuilder(mClassName);
  
          builder.addModifiers(Modifier.FINAL);
          if (mAccessLevel == ActorsPackage.AccessLevel.Public) {
              builder.addModifiers(Modifier.PUBLIC);
          }
  
          builder.addField(FailureHandler.class, FIELD_ERROR_HANDLER, Modifier.PRIVATE);
          builder.addField(ProxyFactoryBase.class, FIELD_PROXY_FACTORY, Modifier.PRIVATE);
  
          builder.addMethod(generateHandlerSetter(builderClass));
          builder.addMethod(generateProxyFactorySetter(builderClass));
  
          TypeSpec threads = generateThreadsClass();
          TypeSpec proxyFactory = generateProxyFactory(interfaces);
  
          builder.addMethod(generateBuild(threads, proxyFactory, ClassName.get(CrashEarlyFailureHandler.class)));
  
          builder.addType(threads);
          builder.addType(proxyFactory);
  
          return JavaFile.builder(mPackageName, builder.build()).build();
      }
focal_method.class_method_signature: ActorsPackageGenerated.generate(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_method.full_signature: @NotNull @Override public JavaFile generate(@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_method.identifier: generate
focal_method.invocations: get classBuilder addModifiers addModifiers addField addField addMethod generateHandlerSetter addMethod generateProxyFactorySetter generateThreadsClass generateProxyFactory addMethod generateBuild get addType addType build builder build
focal_method.modifiers: @NotNull @Override public
focal_method.parameters: (@NonNull List<? extends ActorInterfaceGenerated> interfaces)
focal_method.return: JavaFile
focal_method.signature: JavaFile generate(@NonNull List<? extends ActorInterfaceGenerated> interfaces)