private void reusePropertyNames ( Set < String > reservedNames , Collection < Property > allProps ) { for ( Property prop : allProps ) { // Check if this node can reuse a name from a previous compilation - if // it can set the newName for the property too. String prevName = prevUsedPropertyMap . lookupNewName ( prop . oldName ) ; if ( ! generatePseudoNames && prevName != null ) { // We can reuse prevName if it's not reserved. if ( reservedNames . contains ( prevName ) ) { continue ; } prop . newName = prevName ; reservedNames . add ( prevName ) ; } } }
Runs through the list of properties and renames as many as possible with names from the previous compilation . Also updates reservedNames with the set of reused names .