@NoInline
static Iterator getAllLoadedClasses() {
if(debug())
System.out.println("NativeVMVirtualMachine.getAllLoadedClasses()");
return new Iterator() {
private VmStaticsIterator iter = new VmStaticsIterator(VmUtils.getVm().getSharedStatics());
private Iterator<VmIsolatedStatics> isolated = VmIsolate.staticsIterator();
public boolean hasNext() {
if (iter.hasNext())
return true;
else {
while (isolated.hasNext()) {
iter = new VmStaticsIterator(isolated.next());
if (iter.hasNext())
return true;
}
}
return false;
}
public Object next() {
return iter.next().asClass();
}
public void remove() {
throw new UnsupportedOperationException();
}