All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sk.seges.sesam.pap.service.configurer.ServiceConverterContextProcessorConfigurer Maven / Gradle / Ivy

The newest version!
package sk.seges.sesam.pap.service.configurer;

import sk.seges.sesam.core.pap.configuration.DelegateProcessorConfigurer;
import sk.seges.sesam.pap.service.annotation.LocalServiceConverterContext;
import sk.seges.sesam.pap.service.annotation.LocalServiceConverterContextDelegate;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

public class ServiceConverterContextProcessorConfigurer extends DelegateProcessorConfigurer {

	@Override
	protected Type[] getConfigurationElement(DefaultConfigurationElement element) {
		switch (element) {
		case PROCESSING_ANNOTATIONS:
			return new Type[] { LocalServiceConverterContext.class };
		}
		return new Type[] {};
	}

	@Override
	protected Class getDelegatedAnnotationClass() {
		return LocalServiceConverterContextDelegate.class;
	}

	@Override
	protected Annotation getAnnotationFromDelegate(Annotation annotationDelegate) {
		if (annotationDelegate instanceof LocalServiceConverterContextDelegate) {
			return ((LocalServiceConverterContextDelegate)annotationDelegate).value();
		}
		return null;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy