class RuleExecutionUtils {

    public static String getRuleAttribute(RuleResult result, Map<String, String> ruleParam, PacmanRule ruleAnnotation,
            String attribute) {
        if (ruleParam != null && ruleParam.containsKey(attribute)) {
            return ruleParam.get(attribute);
        }
        if (ruleAnnotation != null) {
            return ruleAnnotation.category();
        }
        return getValueFromResult(result, attribute);
    }

}