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

trip.spi.helpers.FieldQualifierExtractor Maven / Gradle / Ivy

package trip.spi.helpers;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

public interface FieldQualifierExtractor {

	default List> extractQualifiersFrom(Field field) {
		final List> anns = new ArrayList<>();
		for ( final Annotation ann : field.getAnnotations() )
			if ( isAnnotatedWithQualifierAnnotation( ann.annotationType() ) )
				anns.add( ann.annotationType() );
		return anns;
	}

	boolean isAnnotatedWithQualifierAnnotation(Class ann);

	boolean isASingleElementProvider( Field field );

	boolean isAManyElementsProvider( Field field );
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy