final VariableRef varRef = (VariableRef) sort._closureVars.get(i);
final VariableRefBase varRef = (VariableRefBase) sort._closureVars.get(i);
    private static String compileSortRecord(Vector sortObjects,					    ClassGenerator classGen,					    MethodGenerator methodGen) {	final XSLTC  xsltc = ((Sort)sortObjects.firstElement()).getXSLTC();	final String className = xsltc.getHelperClassName();	// This generates a new class for handling this specific sort	final NodeSortRecordGenerator sortRecord =	    new NodeSortRecordGenerator(className,					NODE_SORT_RECORD,					"sort$0.java",					ACC_PUBLIC | ACC_SUPER | ACC_FINAL,					new String[] {},					classGen.getStylesheet());		final ConstantPoolGen cpg = sortRecord.getConstantPool();		// Add a new instance variable for each var in closure	final int nsorts = sortObjects.size();	final ArrayList dups = new ArrayList();	for (int j = 0; j < nsorts; j++) {	    final Sort sort = (Sort) sortObjects.get(j);	    // Set the name of the inner class in this sort object	    sort.setInnerClassName(className);		    final int length = (sort._closureVars == null) ? 0 : 		sort._closureVars.size();	    for (int i = 0; i < length; i++) {		final VariableRef varRef = (VariableRef) sort._closureVars.get(i);		// Discard duplicate variable references		if (dups.contains(varRef)) continue;		final VariableBase var = varRef.getVariable();		sortRecord.addField(new Field(ACC_PUBLIC, 				    cpg.addUtf8(var.getVariable()),				    cpg.addUtf8(var.getType().toSignature()),				    null, cpg.getConstantPool()));		dups.add(varRef);	    }	}	Method init = compileInit(sortObjects, sortRecord,					 cpg, className);	Method extract = compileExtract(sortObjects, sortRecord,					cpg, className);	sortRecord.addMethod(init);	sortRecord.addMethod(extract);	xsltc.dumpClass(sortRecord.getJavaClass());	return className;    }