use of com.ibm.tuningfork.tracegen.types.EventAttribute in project JikesRVM by JikesRVM.
the class EventTypeChunk method add.
@Interruptible
public boolean add(EventType et) {
boolean success = false;
int savedPosition = getPosition();
try {
if (!addInt(et.getIndex()))
return false;
if (!addStringInternal(getChars(et.getName())))
return false;
if (!addStringInternal(getChars(et.getDescription())))
return false;
if (!addInt(et.getNumberOfInts()))
return false;
if (!addInt(et.getNumberOfLongs()))
return false;
if (!addInt(et.getNumberOfDoubles()))
return false;
if (!addInt(et.getNumberOfStrings()))
return false;
for (int i = 0; i < et.getNumberOfAttributes(); i++) {
EventAttribute ea = et.getAttribute(i);
if (!addStringInternal(getChars(ea.getName())))
return false;
if (!addStringInternal(getChars(ea.getDescription())))
return false;
}
success = true;
numberOfEventTypes++;
return true;
} finally {
if (!success) {
seek(savedPosition);
}
}
}
Aggregations