// Add fields to contain the tokens for each port.
Map nameToField = new HashMap();
Map nameToType = new HashMap();
{
Iterator inputPorts = entity.inputPortList().iterator();
while (inputPorts.hasNext()) {
TypedIOPort port = (TypedIOPort) (inputPorts.next());
String name = port.getName(entity);
Type type = PtolemyUtilities.tokenType;