Patch from Jamie to ensure GenService still finds all the array parameters for importing.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5069 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2008-05-09 23:06:43 +00:00
parent 8ca4f9ca47
commit c42281ce7a
2 changed files with 28 additions and 0 deletions
@@ -180,6 +180,25 @@ public class ImportSet
addAll(inner);
}
/**
* Inserts imports for the non-primitive classes contained in all array imports.
*/
public void translateClassArrays ()
{
ImportSet arrayTypes = new ImportSet();
Iterator<String> i = _imports.iterator();
while (i.hasNext()) {
String name = i.next();
int bracket = name.lastIndexOf('[');
if (bracket != -1 &&
name.charAt(bracket + 1) == 'L') {
arrayTypes.add(name.substring(bracket + 2, name.length() - 1));
}
}
addAll(arrayTypes);
}
/**
* Temporarily remove one import matching the given pattern. The most recently pushed pattern