}
@SuppressWarnings("rawtypes")
public void startNode(String name, Class clazz) {
ClassWriter classWriter;
// determine the type of class provided
// set initial parent if first run
if (stack.isEmpty()) {
classWriter = classWriterFactory.create(name, clazz, currentDepth, paramNameIndex++);
currentParent = classWriter;
}
else {
classWriter = currentParent.createChildWriter(name, clazz, currentDepth, paramNameIndex);
}
stack.push(classWriter);
currentDepth++;
paramNameIndex++;
// inform the writer that it has been located. It is up to it if it needs to write something (like new) to the writer
classWriter.create(writer);
}