test_class.declarator: resources
test_class.modifier: private
test_class.original_string: private ResourceBinder resources;
test_class.type: ResourceBinder
test_class.var_name: resources
test_class.declarator: providers
test_class.modifier: private
test_class.original_string: private ProviderBinder providers;
test_class.type: ProviderBinder
test_class.var_name: providers
test_class.declarator: publisher
test_class.modifier: private
test_class.original_string: private ApplicationPublisher publisher;
test_class.type: ApplicationPublisher
test_class.var_name: publisher
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/ApplicationPublisherTest.java
test_class.identifier: ApplicationPublisherTest
test_case.body: @Test
      public void publishesResponseFilterWithFactoryAndOverridesPerRequestResponseFilterThroughEverrestApplication() {
          EverrestApplication application = mock(EverrestApplication.class);
          ObjectFactory responseFilterFactory = mockObjectFactory(AllMatchesResponseFilter.class);
          when(application.getClasses()).thenReturn(newHashSet(AllMatchesResponseFilter.class));
          when(application.getFactories()).thenReturn(newHashSet(responseFilterFactory));
  
          publisher.publish(application);
  
          verify(providers, never()).addResponseFilter(AllMatchesResponseFilter.class);
          verify(providers).addResponseFilter(responseFilterFactory);
      }
test_case.class_method_signature: ApplicationPublisherTest.publishesResponseFilterWithFactoryAndOverridesPerRequestResponseFilterThroughEverrestApplication()
test_case.full_signature: @Test public void publishesResponseFilterWithFactoryAndOverridesPerRequestResponseFilterThroughEverrestApplication()
test_case.identifier: publishesResponseFilterWithFactoryAndOverridesPerRequestResponseFilterThroughEverrestApplication
test_case.invocations: mock mockObjectFactory thenReturn when getClasses newHashSet thenReturn when getFactories newHashSet publish addResponseFilter verify never addResponseFilter verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void publishesResponseFilterWithFactoryAndOverridesPerRequestResponseFilterThroughEverrestApplication()
focal_class.declarator: resources
focal_class.modifier: private final
focal_class.original_string: private final ResourceBinder        resources;
focal_class.type: ResourceBinder
focal_class.var_name: resources
focal_class.declarator: componentResolver
focal_class.modifier: private final
focal_class.original_string: private final RestComponentResolver componentResolver;
focal_class.type: RestComponentResolver
focal_class.var_name: componentResolver
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/ApplicationPublisher.java
focal_class.identifier: ApplicationPublisher
focal_class.class_method_signature: ApplicationPublisher.ApplicationPublisher(ResourceBinder resources, ProviderBinder providers)
focal_class.full_signature: public  ApplicationPublisher(ResourceBinder resources, ProviderBinder providers)
focal_class.identifier: ApplicationPublisher
focal_class.modifiers: public
focal_class.parameters: (ResourceBinder resources, ProviderBinder providers)
focal_class.signature:  ApplicationPublisher(ResourceBinder resources, ProviderBinder providers)
focal_class.class_method_signature: ApplicationPublisher.ApplicationPublisher(ResourceBinder resources, RestComponentResolver componentResolver)
focal_class.full_signature:   ApplicationPublisher(ResourceBinder resources, RestComponentResolver componentResolver)
focal_class.identifier: ApplicationPublisher
focal_class.parameters: (ResourceBinder resources, RestComponentResolver componentResolver)
focal_class.signature:  ApplicationPublisher(ResourceBinder resources, RestComponentResolver componentResolver)
focal_class.class_method_signature: ApplicationPublisher.publish(Application application)
focal_class.full_signature: public void publish(Application application)
focal_class.identifier: publish
focal_class.modifiers: public
focal_class.parameters: (Application application)
focal_class.return: void
focal_class.signature: void publish(Application application)
focal_class.class_method_signature: ApplicationPublisher.addResource(String uriPattern, Class<?> resourceClass)
focal_class.full_signature: private void addResource(String uriPattern, Class<?> resourceClass)
focal_class.identifier: addResource
focal_class.modifiers: private
focal_class.parameters: (String uriPattern, Class<?> resourceClass)
focal_class.return: void
focal_class.signature: void addResource(String uriPattern, Class<?> resourceClass)
focal_class.class_method_signature: ApplicationPublisher.addResource(String uriPattern, Object resource)
focal_class.full_signature: private void addResource(String uriPattern, Object resource)
focal_class.identifier: addResource
focal_class.modifiers: private
focal_class.parameters: (String uriPattern, Object resource)
focal_class.return: void
focal_class.signature: void addResource(String uriPattern, Object resource)
focal_class.class_method_signature: ApplicationPublisher.addSingleton(Object instance)
focal_class.full_signature: private void addSingleton(Object instance)
focal_class.identifier: addSingleton
focal_class.modifiers: private
focal_class.parameters: (Object instance)
focal_class.return: void
focal_class.signature: void addSingleton(Object instance)
focal_class.class_method_signature: ApplicationPublisher.addPerRequest(Class clazz)
focal_class.full_signature: @SuppressWarnings({"unchecked"}) private void addPerRequest(Class clazz)
focal_class.identifier: addPerRequest
focal_class.modifiers: @SuppressWarnings({"unchecked"}) private
focal_class.parameters: (Class clazz)
focal_class.return: void
focal_class.signature: void addPerRequest(Class clazz)
focal_class.class_method_signature: ApplicationPublisher.addFactory(ObjectFactory factory)
focal_class.full_signature: @SuppressWarnings({"unchecked"}) private void addFactory(ObjectFactory factory)
focal_class.identifier: addFactory
focal_class.modifiers: @SuppressWarnings({"unchecked"}) private
focal_class.parameters: (ObjectFactory factory)
focal_class.return: void
focal_class.signature: void addFactory(ObjectFactory factory)
focal_method.body: public void publish(Application application) {
          Set<Class<?>> classes = new LinkedHashSet<>();
          Set<Class<?>> appClasses = application.getClasses();
          if (appClasses != null) {
              classes.addAll(appClasses);
          }
          if (application instanceof EverrestApplication) {
              EverrestApplication everrest = (EverrestApplication)application;
              for (Map.Entry<String, Class<?>> e : everrest.getResourceClasses().entrySet()) {
                  Class<?> clazz = e.getValue();
                  addResource(e.getKey(), clazz);
                  classes.remove(clazz);
              }
              for (Map.Entry<String, Object> e : everrest.getResourceSingletons().entrySet()) {
                  addResource(e.getKey(), e.getValue());
              }
              for (ObjectFactory<? extends ObjectModel> factory : everrest.getFactories()) {
                  addFactory(factory);
                  classes.remove(factory.getObjectModel().getObjectClass());
              }
          }
          for (Class<?> clazz : classes) {
              addPerRequest(clazz);
          }
          Set<Object> singletons = application.getSingletons();
          if (singletons != null) {
              for (Object instance : singletons) {
                  addSingleton(instance);
              }
          }
      }
focal_method.class_method_signature: ApplicationPublisher.publish(Application application)
focal_method.full_signature: public void publish(Application application)
focal_method.identifier: publish
focal_method.invocations: getClasses addAll entrySet getResourceClasses getValue addResource getKey remove entrySet getResourceSingletons addResource getKey getValue getFactories addFactory remove getObjectClass getObjectModel addPerRequest getSingletons addSingleton
focal_method.modifiers: public
focal_method.parameters: (Application application)
focal_method.return: void
focal_method.signature: void publish(Application application)