Code example for AnnotationAttributes

Methods: getEnum

0
 
	@Bean(name = MBEAN_EXPORTER_NAME)
	@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
	public IntegrationMBeanExporter mbeanExporter() { 
		IntegrationMBeanExporter exporter = new IntegrationMBeanExporter();
		exporter.setRegistrationPolicy(this.attributes.<RegistrationPolicy>getEnum("registration"));
		setupDomain(exporter);
		setupServer(exporter);
		setupComponentNamePatterns(exporter);
		return exporter;
	} 
 
	private void setupDomain(IntegrationMBeanExporter exporter) {
		String defaultDomain = this.attributes.getString("defaultDomain");
		if (defaultDomain != null && this.environment != null) {
			defaultDomain = this.environment.resolvePlaceholders(defaultDomain);
		} 
		if (StringUtils.hasText(defaultDomain)) {
			exporter.setDefaultDomain(defaultDomain);
		} 
Experience pair programming with AI  Get Codota for Java