use of com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer in project openj9 by eclipse.
the class GCClassHeapIterator method next.
public J9ClassPointer next() {
try {
if (hasNext()) {
J9ClassPointer clazz = classPointer;
classPointer = classPointer.nextClassInSegment();
return clazz;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
} catch (CorruptDataException cde) {
// can try to recover from this
raiseCorruptDataEvent("Could not set the current class", cde, false);
return null;
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer in project openj9 by eclipse.
the class GCMixedObjectIterator_V1 method initializeDescriptionArray.
protected void initializeDescriptionArray(J9ClassPointer clazz) throws CorruptDataException {
UDATAPointer descriptionPtr = clazz.instanceDescription();
long tempDescription;
if (descriptionPtr.anyBitsIn(1)) {
// Immediate
tempDescription = descriptionPtr.getAddress() >>> 1;
initializeDescriptionArray(tempDescription, 0);
} else {
int descriptionSlot = 0;
int descriptionIndex = 0;
while (descriptionIndex < scanLimit) {
tempDescription = descriptionPtr.at(descriptionSlot++).longValue();
initializeDescriptionArray(tempDescription, descriptionIndex);
descriptionIndex += objectsInDescriptionSlot;
}
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer in project openj9 by eclipse.
the class GCObjectModel_V1 method getScanType.
@Override
public long getScanType(J9ObjectPointer object) throws CorruptDataException {
long result;
J9ClassPointer clazz = J9ObjectHelper.clazz(object);
return getScanType(clazz);
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer in project openj9 by eclipse.
the class GCVMClassSlotIterator method next.
public J9ClassPointer next() {
try {
if (hasNext()) {
J9ClassPointer next = J9ClassPointer.cast(scanPtr.at(0));
scanPtr = scanPtr.add(1);
return next;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
} catch (CorruptDataException e) {
// can try to recover from this
raiseCorruptDataEvent("Error getting next item", e, false);
return null;
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer in project openj9 by eclipse.
the class ClassIterator method fromJ9Classloader.
public static Iterator<J9ClassPointer> fromJ9Classloader(J9ClassLoaderPointer loader) throws CorruptDataException {
J9HashTablePointer table = loader.classHashTable();
Iterator<J9ClassPointer> iterator = null;
if (table.listNodePool().notNull()) {
iterator = new ClassIterator(Pool.fromJ9Pool(table.listNodePool(), J9ClassPointer.class, false).iterator());
} else {
iterator = new ArrayIterator<J9ClassPointer>(J9ClassPointer.class, table.tableSize().intValue(), table.nodes()).iterator();
}
return new ClassIterator(iterator);
}
Aggregations