public static boolean isOSGi() {
        if (isOSGi == null) {
            try {
                // first verify that framework classes are available (otherwise loading of Activator will fail)
                Class.forName("org.osgi.framework.Bundle");

                // then verify that bundle is started (client code could add framework classes into classpath)
                isOSGi = Activator.getBundle() != null;
            } catch (ClassNotFoundException e) {
                isOSGi = Boolean.FALSE;
            }

            LOG.info("OSGi support is {}", isOSGi);
        }

        return isOSGi;
    }
Returns {@code true} if Dozer is executed in OSGi container.

@return if Dozer is in OSGi container.
core/src/main/java/com/github/dozermapper/core/util/RuntimeUtils.java