List of usage examples for org.springframework.core.type StandardAnnotationMetadata getAnnotationAttributes
@Nullable
default Map<String, Object> getAnnotationAttributes(String annotationName)
From source file:org.appcomponents.platform.test.loader.PlatformContextLoader.java
@SuppressWarnings("unchecked") @Override/*from w w w .j av a2 s.c o m*/ protected SpringApplication getSpringApplication() { StandardAnnotationMetadata annotationMetadata = new StandardAnnotationMetadata(this.config.getTestClass()); Map<String, Object> annotationAttributes = annotationMetadata .getAnnotationAttributes(PlatformTest.class.getName()); Assert.notNull(annotationAttributes, "No PlatformTest is specified"); Class<? extends PlatformFactory> platformFactoryClass = (Class<? extends PlatformFactory>) annotationAttributes .get("platformFactory"); PlatformFactory platformFactory = BeanUtils.instantiate(platformFactoryClass); return platformFactory.build(); }