Examples of StandardAnnotationMetadata


Examples of org.springframework.core.type.StandardAnnotationMetadata

    private final AnnotationMetadata metadata;

    public SourceClass(Object source) {
      this.source = source;
      if (source instanceof Class<?>) {
        this.metadata = new StandardAnnotationMetadata((Class<?>) source, true);
      }
      else {
        this.metadata = ((MetadataReader) source).getAnnotationMetadata();
      }
    }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

    AnnotationMetadata metadata = null;
 
    // 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()) {
      metadata = new StandardAnnotationMetadata(((AbstractBeanDefinition) beanDef).getBeanClass());
    }
    else {
      String className = beanDef.getBeanClassName();
      if (className != null) {
        try {
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

    this.resource = metadataReader.getResource();
    this.beanName = beanName;
  }

  public ConfigurationClass(Class<?> clazz, String beanName) {
    this.metadata = new StandardAnnotationMetadata(clazz);
    this.resource = new DescriptiveResource(clazz.toString());
    this.beanName = beanName;
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

      doProcessConfigurationClass(configClass, metadata);
      String superClassName = metadata.getSuperClassName();
      if (superClassName != null && !Object.class.getName().equals(superClassName)) {
        if (metadata instanceof StandardAnnotationMetadata) {
          Class<?> clazz = ((StandardAnnotationMetadata) metadata).getIntrospectedClass();
          metadata = new StandardAnnotationMetadata(clazz.getSuperclass());
        }
        else {
          MetadataReader reader = this.metadataReaderFactory.getMetadataReader(superClassName);
          metadata = reader.getAnnotationMetadata();
        }
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

    return null;
  }

  private boolean hasProxyAnnotation(Annotation annotation) {
    AnnotationMetadata metadata = new StandardAnnotationMetadata(
        annotation.annotationType());
    return metadata.hasAnnotation(SCOPE_PROXY);
  }
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

        this.resourceLoader, this.environment).registerRepositoriesIn(registry,
        getRepositoryConfigurationExtension());
  }

  private AnnotationRepositoryConfigurationSource getConfigurationSource() {
    StandardAnnotationMetadata metadata = new StandardAnnotationMetadata(
        getConfiguration(), true);
    return new AnnotationRepositoryConfigurationSource(metadata, getAnnotation(),
        this.resourceLoader, this.environment) {
      @Override
      public java.lang.Iterable<String> getBasePackages() {
View Full Code Here

Examples of org.springframework.core.type.StandardAnnotationMetadata

  public AnnotationMBeanExporter mbeanExporter() {
    // Re-use the @EnableMBeanExport configuration
    MBeanExportConfiguration config = new MBeanExportConfiguration();
    config.setEnvironment(this.environment);
    config.setBeanFactory(this.beanFactory);
    config.setImportMetadata(new StandardAnnotationMetadata(Empty.class));
    // But add a custom naming strategy
    AnnotationMBeanExporter exporter = config.mbeanExporter();
    exporter.setNamingStrategy(this.namingStrategy);
    return exporter;
  }
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.