Package com.foreach.across.core.filters

Examples of com.foreach.across.core.filters.ClassBeanFilter


    }

    @Bean
    public ExposingModule mybeanModule() {
      ExposingModule module = new ExposingModule( "mybean" );
      module.setExposeFilter( new ClassBeanFilter( MyBean.class ) );

      return module;
    }
View Full Code Here


  @Autowired
  private BeanWithRefreshableAnnotation otherBeanWithExposedAnnotation;

  @Test
  public void filterByClass() {
    BeanFilter filter = new ClassBeanFilter( BeanWithServiceAnnotation.class );

    Map<String, Object> beans = ApplicationContextScanner.findSingletonsMatching( applicationContext, filter );
    assertEquals( 1, beans.size() );
    assertSame( beanWithServiceAnnotation, beans.get( "beanWithServiceAnnotation" ) );
View Full Code Here

    assertTrue( definitions.containsKey( "prototypeExposedBean" ) );
  }

  @Test
  public void filterByInterface() {
    BeanFilter filter = new ClassBeanFilter( Marker.class );

    Map<String, Object> beans = ApplicationContextScanner.findSingletonsMatching( applicationContext, filter );
    assertEquals( 3, beans.size() );
    assertSame( beanWithExposedAnnotation, beans.get( "beanWithExposedAnnotation" ) );
    assertSame( otherBeanWithRefreshableAnnotation, beans.get( "otherBeanWithRefreshableAnnotation" ) );
View Full Code Here

TOP

Related Classes of com.foreach.across.core.filters.ClassBeanFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.