Generate a call to the method compiled for this attribute set
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
final SymbolTable symbolTable = getParser().getSymbolTable();
// Go through each attribute set and generate a method call
for (int i=0; i<_sets.size(); i++) {
// Get the attribute set name
final QName name = (QName)_sets.elementAt(i);
// Get the AttributeSet reference from the symbol table
final AttributeSet attrs = symbolTable.lookupAttributeSet(name);
// Compile the call to the set's method if the set exists
if (attrs != null) {
final String methodName = attrs.getMethodName();
il.append(classGen.loadTranslet());
il.append(methodGen.loadDOM());
il.append(methodGen.loadIterator());
il.append(methodGen.loadHandler());
il.append(methodGen.loadCurrentNode());
final int method = cpg.addMethodref(classGen.getClassName(),
methodName, ATTR_SET_SIG);
il.append(new INVOKESPECIAL(method));
}
// Generate an error if the attribute set does not exist
else {
final Parser parser = getParser();
final String atrs = name.toString();
reportError(this, parser, ErrorMsg.ATTRIBSET_UNDEF_ERR, atrs);
}
}