Package org.springframework.ide.eclipse.core.java.annotation

Examples of org.springframework.ide.eclipse.core.java.annotation.Annotation


  @Test
  public void testAdvancedComponentScanCase() throws Exception {
    IType type = JdtUtils.getJavaType(project, "org.test.spring.AdvancedComponentScanClass");
    IAnnotationMetadata metadata = getAnnotationMetadata(type);

    Annotation annotationMetadata = metadata.getTypeLevelAnnotation(ComponentScan.class.getName());
    assertEquals(ComponentScan.class.getName(), annotationMetadata.getAnnotationClass());
   
    Set<AnnotationMemberValuePair> members = annotationMetadata.getMembers();
    assertEquals(1, members.size());
   
    AnnotationMemberValuePair values = members.iterator().next();
    assertEquals("excludeFilters", values.getName());
    assertTrue(values.getValueAsObject() instanceof Type[]);
View Full Code Here


  @Test
  public void testAdvancedComponentScanWithEmptyArrayCase() throws Exception {
    IType type = JdtUtils.getJavaType(project, "org.test.spring.AdvancedComponentScanClassWithEmptyArray");
    IAnnotationMetadata metadata = getAnnotationMetadata(type);

    Annotation annotationMetadata = metadata.getTypeLevelAnnotation(ComponentScan.class.getName());
    assertEquals(ComponentScan.class.getName(), annotationMetadata.getAnnotationClass());
   
    Set<AnnotationMemberValuePair> members = annotationMetadata.getMembers();
    assertEquals(0, members.size());
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.core.java.annotation.Annotation

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.