String typeName = getFirstArg(typeCall);
if(typeName == null)
continue;
Map<String, PPTypeInfo.Entry> propertyMap = Maps.newHashMap();
propertyMap.put(getFirstArg(callNode), getEntry(callNode));
result.add(new PPTypeInfo(typeName, "", propertyMap, null));
continue;
}
if(NEWPARAM.equals(callNode.getName())) {
CallNode typeCall = opCallVisitor.findOpCall(callNode.getReceiver(), "type", "Puppet", "Type");
if(typeCall == null)
continue;
String typeName = getFirstArg(typeCall);
if(typeName == null)
continue;
Map<String, PPTypeInfo.Entry> parameterMap = Maps.newHashMap();
parameterMap.put(getFirstArg(callNode), getEntry(callNode));
result.add(new PPTypeInfo(typeName, "", null, parameterMap));
continue;
}
if(NEWCHECK.equals(callNode.getName())) {
CallNode typeCall = opCallVisitor.findOpCall(callNode.getReceiver(), "type", "Puppet", "Type");
if(typeCall == null)
continue;
String typeName = getFirstArg(typeCall);
if(typeName == null)
continue;
Map<String, PPTypeInfo.Entry> parameterMap = Maps.newHashMap();
parameterMap.put(getFirstArg(callNode), getEntry(callNode));
result.add(new PPTypeInfo(typeName, "", null, parameterMap));
}
// NOTE: this does probably never occur
if(ENSURABLE.equals(callNode.getName())) {
CallNode typeCall = opCallVisitor.findOpCall(callNode.getReceiver(), "type", "Puppet", "Type");
if(typeCall == null)
continue;
String typeName = getFirstArg(typeCall);
if(typeName == null)
continue;
Map<String, PPTypeInfo.Entry> parameterMap = Maps.newHashMap();
parameterMap.put("ensure", getEntry(callNode));
result.add(new PPTypeInfo(typeName, "", parameterMap, null));
}
}
}
}