test_class.file: dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/bootstrap/builders/ReferenceBuilderTest.java
test_class.identifier: ReferenceBuilderTest
test_case.body: @Test
      void build() {
          ConsumerConfig consumer = new ConsumerConfig();
          MethodConfig method = new MethodConfig();
  
          ReferenceBuilder<DemoService> builder = new ReferenceBuilder<>();
          builder.id("id")
                  .interfaceClass(DemoService.class)
                  .protocol("protocol")
                  .client("client")
                  .url("url")
                  .consumer(consumer)
                  .addMethod(method)
                  // introduced since 2.7.8
                  .services("test-service", "test-service2");
  
          ReferenceConfig config = builder.build();
          ReferenceConfig config2 = builder.build();
  
          Assertions.assertEquals("org.apache.dubbo.config.api.DemoService", config.getInterface());
          Assertions.assertEquals(DemoService.class, config.getInterfaceClass());
          Assertions.assertEquals("protocol", config.getProtocol());
          Assertions.assertEquals("client", config.getClient());
          Assertions.assertEquals("url", config.getUrl());
          Assertions.assertEquals(consumer, config.getConsumer());
          Assertions.assertEquals("test-service,test-service2", config.getServices());
          Assertions.assertEquals(ofSet("test-service", "test-service2"), config.getSubscribedServices());
          Assertions.assertTrue(config.getMethods().contains(method));
          Assertions.assertEquals(1, config.getMethods().size());
          Assertions.assertNotSame(config, config2);
      }
test_case.class_method_signature: ReferenceBuilderTest.build()
test_case.full_signature: @Test void build()
test_case.identifier: build
test_case.invocations: services addMethod consumer url client protocol interfaceClass id build build assertEquals getInterface assertEquals getInterfaceClass assertEquals getProtocol assertEquals getClient assertEquals getUrl assertEquals getConsumer assertEquals getServices assertEquals ofSet getSubscribedServices assertTrue contains getMethods assertEquals size getMethods assertNotSame
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void build()
focal_class.declarator: interfaceName
focal_class.modifier: private
focal_class.original_string: private String interfaceName;
focal_class.type: String
focal_class.var_name: interfaceName
focal_class.declarator: interfaceClass
focal_class.modifier: private
focal_class.original_string: private Class<?> interfaceClass;
focal_class.type: Class<?>
focal_class.var_name: interfaceClass
focal_class.declarator: client
focal_class.modifier: private
focal_class.original_string: private String client;
focal_class.type: String
focal_class.var_name: client
focal_class.declarator: url
focal_class.modifier: private
focal_class.original_string: private String url;
focal_class.type: String
focal_class.var_name: url
focal_class.declarator: methods
focal_class.modifier: private
focal_class.original_string: private List<MethodConfig> methods;
focal_class.type: List<MethodConfig>
focal_class.var_name: methods
focal_class.declarator: consumer
focal_class.modifier: private
focal_class.original_string: private ConsumerConfig consumer;
focal_class.type: ConsumerConfig
focal_class.var_name: consumer
focal_class.declarator: protocol
focal_class.modifier: private
focal_class.original_string: private String protocol;
focal_class.type: String
focal_class.var_name: protocol
focal_class.declarator: services
focal_class.modifier: private
focal_class.original_string: private String services;
focal_class.type: String
focal_class.var_name: services
focal_class.file: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/builders/ReferenceBuilder.java
focal_class.identifier: ReferenceBuilder
focal_class.class_method_signature: ReferenceBuilder.newBuilder()
focal_class.full_signature: public static ReferenceBuilder newBuilder()
focal_class.identifier: newBuilder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: ReferenceBuilder
focal_class.signature: ReferenceBuilder newBuilder()
focal_class.class_method_signature: ReferenceBuilder.id(String id)
focal_class.full_signature: public ReferenceBuilder<T> id(String id)
focal_class.identifier: id
focal_class.modifiers: public
focal_class.parameters: (String id)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> id(String id)
focal_class.class_method_signature: ReferenceBuilder.interfaceName(String interfaceName)
focal_class.full_signature: public ReferenceBuilder<T> interfaceName(String interfaceName)
focal_class.identifier: interfaceName
focal_class.modifiers: public
focal_class.parameters: (String interfaceName)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> interfaceName(String interfaceName)
focal_class.class_method_signature: ReferenceBuilder.interfaceClass(Class<?> interfaceClass)
focal_class.full_signature: public ReferenceBuilder<T> interfaceClass(Class<?> interfaceClass)
focal_class.identifier: interfaceClass
focal_class.modifiers: public
focal_class.parameters: (Class<?> interfaceClass)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> interfaceClass(Class<?> interfaceClass)
focal_class.class_method_signature: ReferenceBuilder.client(String client)
focal_class.full_signature: public ReferenceBuilder<T> client(String client)
focal_class.identifier: client
focal_class.modifiers: public
focal_class.parameters: (String client)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> client(String client)
focal_class.class_method_signature: ReferenceBuilder.url(String url)
focal_class.full_signature: public ReferenceBuilder<T> url(String url)
focal_class.identifier: url
focal_class.modifiers: public
focal_class.parameters: (String url)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> url(String url)
focal_class.class_method_signature: ReferenceBuilder.addMethods(List<MethodConfig> methods)
focal_class.full_signature: public ReferenceBuilder<T> addMethods(List<MethodConfig> methods)
focal_class.identifier: addMethods
focal_class.modifiers: public
focal_class.parameters: (List<MethodConfig> methods)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> addMethods(List<MethodConfig> methods)
focal_class.class_method_signature: ReferenceBuilder.addMethod(MethodConfig method)
focal_class.full_signature: public ReferenceBuilder<T> addMethod(MethodConfig method)
focal_class.identifier: addMethod
focal_class.modifiers: public
focal_class.parameters: (MethodConfig method)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> addMethod(MethodConfig method)
focal_class.class_method_signature: ReferenceBuilder.consumer(ConsumerConfig consumer)
focal_class.full_signature: public ReferenceBuilder<T> consumer(ConsumerConfig consumer)
focal_class.identifier: consumer
focal_class.modifiers: public
focal_class.parameters: (ConsumerConfig consumer)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> consumer(ConsumerConfig consumer)
focal_class.class_method_signature: ReferenceBuilder.protocol(String protocol)
focal_class.full_signature: public ReferenceBuilder<T> protocol(String protocol)
focal_class.identifier: protocol
focal_class.modifiers: public
focal_class.parameters: (String protocol)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> protocol(String protocol)
focal_class.class_method_signature: ReferenceBuilder.services(String service, String... otherServices)
focal_class.full_signature: public ReferenceBuilder<T> services(String service, String... otherServices)
focal_class.identifier: services
focal_class.modifiers: public
focal_class.parameters: (String service, String... otherServices)
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> services(String service, String... otherServices)
focal_class.class_method_signature: ReferenceBuilder.build()
focal_class.full_signature: public ReferenceConfig<T> build()
focal_class.identifier: build
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ReferenceConfig<T>
focal_class.signature: ReferenceConfig<T> build()
focal_class.class_method_signature: ReferenceBuilder.getThis()
focal_class.full_signature: @Override protected ReferenceBuilder<T> getThis()
focal_class.identifier: getThis
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: ReferenceBuilder<T>
focal_class.signature: ReferenceBuilder<T> getThis()
focal_class.superclass: extends AbstractReferenceBuilder<ReferenceConfig, ReferenceBuilder<T>>
focal_method.body: public ReferenceConfig<T> build() {
          ReferenceConfig<T> reference = new ReferenceConfig<>();
          super.build(reference);
  
          reference.setInterface(interfaceName);
          if (interfaceClass != null) {
              reference.setInterface(interfaceClass);
          }
          reference.setClient(client);
          reference.setUrl(url);
          reference.setMethods(methods);
          reference.setConsumer(consumer);
          reference.setProtocol(protocol);
          // @since 2.7.8
          reference.setServices(services);
  
          return reference;
      }
focal_method.class_method_signature: ReferenceBuilder.build()
focal_method.full_signature: public ReferenceConfig<T> build()
focal_method.identifier: build
focal_method.invocations: build setInterface setInterface setClient setUrl setMethods setConsumer setProtocol setServices
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: ReferenceConfig<T>
focal_method.signature: ReferenceConfig<T> build()