while (it.hasNext()) {
// Enumerators are created in the same scope
// as the enum, according to IDL grammar rules.
String n = ((Enumerator)it.next()).getValue();
IdlEnumerator enumerator = IdlEnumerator.create(scope, n);
scope.addToScope(enumerator);
enum1.addEnumerator(enumerator);
}
scope.addToScope(enum1);
return enum1;