Examples of StandardAnnotationMetadata


Examples of org.springframework.core.type.StandardAnnotationMetadata

    // Check already loaded Class if present...
    // since we possibly can't even load the class file for this Class.
    if (beanDef instanceof AbstractBeanDefinition && ((AbstractBeanDefinition) beanDef).hasBeanClass()) {
      Class<?> beanClass = ((AbstractBeanDefinition) beanDef).getBeanClass();
      metadata = new StandardAnnotationMetadata(beanClass, true);
    }
    else {
      String className = beanDef.getBeanClassName();
      if (className != null) {
        try {
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

      String superclass = metadata.getSuperClassName();
      if (this.knownSuperclasses.add(superclass)) {
        // superclass found, return its annotation metadata and recurse
        if (metadata instanceof StandardAnnotationMetadata) {
          Class<?> clazz = ((StandardAnnotationMetadata) metadata).getIntrospectedClass();
          return new StandardAnnotationMetadata(clazz.getSuperclass(), true);
        }
        else if (superclass.startsWith("java")) {
          // never load core JDK classes via ASM, in particular not java.lang.Object!
          try {
            return new StandardAnnotationMetadata(
                this.resourceLoader.getClassLoader().loadClass(superclass), true);
          }
          catch (ClassNotFoundException ex) {
            throw new IllegalStateException(ex);
          }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

   * @throws IllegalArgumentException if beanName is null (as of Spring 3.1.1)
   * @see ConfigurationClass#ConfigurationClass(Class, boolean)
   */
  public ConfigurationClass(Class<?> clazz, String beanName) {
    Assert.hasText(beanName, "bean name must not be null");
    this.metadata = new StandardAnnotationMetadata(clazz, true);
    this.resource = new DescriptiveResource(clazz.toString());
    this.beanName = beanName;
    this.imported = false;
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

   * @param clazz the underlying {@link Class} to represent
   * @param beanName name of the {@code @Configuration} class bean
   * @since 3.1.1
   */
  public ConfigurationClass(Class<?> clazz, boolean imported) {
    this.metadata = new StandardAnnotationMetadata(clazz, true);
    this.resource = new DescriptiveResource(clazz.toString());
    this.imported = imported;
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

   * Create a new AnnotatedGenericBeanDefinition for the given bean class.
   * @param beanClass the loaded bean class
   */
  public AnnotatedGenericBeanDefinition(Class beanClass) {
    setBeanClass(beanClass);
    this.annotationMetadata = new StandardAnnotationMetadata(beanClass);
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

  AnnotationMetadata metadata;

  @Before
  public void setUp() {

    metadata = new StandardAnnotationMetadata(Config.class, true);
    registry = new DefaultListableBeanFactory();
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

   * Create a new AnnotatedGenericBeanDefinition for the given bean class.
   * @param beanClass the loaded bean class
   */
  public AnnotatedGenericBeanDefinition(Class<?> beanClass) {
    setBeanClass(beanClass);
    this.metadata = new StandardAnnotationMetadata(beanClass, true);
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

   * @param beanName name of the {@code @Configuration} class bean
   * @see ConfigurationClass#ConfigurationClass(Class, ConfigurationClass)
   */
  public ConfigurationClass(Class<?> clazz, String beanName) {
    Assert.hasText(beanName, "Bean name must not be null");
    this.metadata = new StandardAnnotationMetadata(clazz, true);
    this.resource = new DescriptiveResource(clazz.toString());
    this.beanName = beanName;
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

   * @param clazz the underlying {@link Class} to represent
   * @param importedBy the configuration class importing this one or {@code null}
   * @since 3.1.1
   */
  public ConfigurationClass(Class<?> clazz, ConfigurationClass importedBy) {
    this.metadata = new StandardAnnotationMetadata(clazz, true);
    this.resource = new DescriptiveResource(clazz.toString());
    this.importedBy.add(importedBy);
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

    }
    else if (beanDef instanceof AbstractBeanDefinition && ((AbstractBeanDefinition) beanDef).hasBeanClass()) {
      // Check already loaded Class if present...
      // since we possibly can't even load the class file for this Class.
      Class<?> beanClass = ((AbstractBeanDefinition) beanDef).getBeanClass();
      metadata = new StandardAnnotationMetadata(beanClass, true);
    }
    else {
      try {
        MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(className);
        metadata = metadataReader.getAnnotationMetadata();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.