private static boolean requireMapping(Mapping mapping, Class<?> clazz, String fieldName, String pairName) {
        try {
            return !mapping.optional()
                   || (mapping.optional() && clazz.getDeclaredField(pairName.isEmpty() ? fieldName : pairName) != null);
        } catch (NoSuchFieldException e) {
            return false;
        }
    }
true if we should stop after applied

@param classMap      information about the classes being mapped
@param configuration configuration of the mapping
@return true if we should stop after applied
core/src/main/java/com/github/dozermapper/core/classmap/ClassMapBuilder.java