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

com.qwlabs.q.cdi.QEngineAware Maven / Gradle / Ivy

There is a newer version: 0.2.354
Show newest version
package com.qwlabs.q.cdi;

import com.qwlabs.cdi.SafeCDI;
import com.qwlabs.q.QEngine;
import com.qwlabs.q.QMessages;

import jakarta.enterprise.inject.Instance;

public interface QEngineAware {
    default QEngine engine() {
        return SafeCDI.select(QEngine.class)
                .map(Instance::get)
                .orElseThrow(QMessages.INSTANCE::engineNotFound);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy