private Named getNamedAnnotation(Annotation[] annotations) {
        for (Annotation annotation : annotations) {
            if (annotation.annotationType().equals(Named.class)) {
                return (Named) annotation;
            }
        }
        return null;
    }
{@code AbstractModule} provides a base class for annotation based dependency injection

@author tiwe
querydsl-codegen/src/main/java/com/querydsl/codegen/AbstractModule.java