public class ServiceContainerVariableCollector implements TwigFileVariableCollector {
@Override
public void collect(TwigFileVariableCollectorParameter parameter, HashMap<String, Set<String>> variables) {
TwigGlobalsServiceParser twigPathServiceParser = ServiceXmlParserFactory.getInstance(parameter.getProject(), TwigGlobalsServiceParser.class);
for(Map.Entry<String, TwigGlobalVariable> globalVariableEntry: twigPathServiceParser.getTwigGlobals().entrySet()) {
if(globalVariableEntry.getValue().getTwigGlobalEnum() == TwigGlobalEnum.SERVICE) {
String serviceClass = ServiceXmlParserFactory.getInstance(parameter.getProject(), XmlServiceParser.class).getServiceMap().getMap().get(globalVariableEntry.getValue().getValue());
if (serviceClass != null) {
variables.put(globalVariableEntry.getKey(), new HashSet<String>(Arrays.asList(serviceClass)));
}