private Set<Parameter> getParameterValues(AbstractElement object) { Set<Parameter> parameterValues = Collections.emptySet(); if (currentConfig != null) { parameterValues = currentConfig; } else { parameterValues = ParameterConfigHelper.getAssignedParameters(object, parameterConfig); } return parameterValues; }
@Override public Boolean caseRuleCall(RuleCall object) { if (!visitedRuleCalls.add(object)) return isOptional(object); acceptor.accept(object); Set<Parameter> oldConfig = currentConfig; try { if (!object.getArguments().isEmpty()) { currentConfig = ParameterConfigHelper.getAssignedArguments(object, getParameterValues(object)); } else { currentConfig = Collections.emptySet(); } Boolean result = doSwitch(object.getRule()) || isOptional(object); visitedRuleCalls.remove(object); return result; } finally { currentConfig = oldConfig; } }