fields = new HashMap((int) (1.25 * size + 1));
mapToObjectFields = new HashMap((int) (1.25 * size + 1));
fieldsArray = new Field[size];
for (int i = size - 1; i >= 0; i--)
{
XmlField f = (XmlField) inputFields.get(i);
Field field = FieldFactory.getInstance(f, this);
fieldsArray[i] = field;
fields.put(f.getName(), field);
// map fields by their mapToObject
List tmpFields = (List) mapToObjectFields.get(f.getMapToObject());
if (tmpFields == null)
{
tmpFields = new ArrayList(size);
mapToObjectFields.put(f.getMapToObject(), tmpFields);
}
tmpFields.add(field);
}
// Change the mapToObjectFields values to Field[]