public Collection weave(IClassFileProvider input) throws IOException { Collection wovenClassNames = new ArrayList(); IWeaveRequestor requestor = input.getRequestor();
public Collection weave(File file) throws IOException { OutputStream os = FileUtil.makeOutputStream(file); this.zipOutputStream = new ZipOutputStream(os); prepareForWeave(); Collection c = weave( new IClassFileProvider() {
    public Collection weave(IClassFileProvider input) throws IOException {    	Collection wovenClassNames = new ArrayList();    	IWeaveRequestor requestor = input.getRequestor();    	requestor.processingReweavableState();		prepareToProcessReweavableState();		// clear all state from files we'll be reweaving		for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {		    UnwovenClassFile classFile = (UnwovenClassFile)i.next();			String className = classFile.getClassName();		    BcelObjectType classType = getClassType(className);			            			processReweavableStateIfPresent(className, classType);		}										requestor.addingTypeMungers();		//XXX this isn't quite the right place for this...		for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {		    UnwovenClassFile classFile = (UnwovenClassFile)i.next();		    String className = classFile.getClassName();		    addTypeMungers(className);		}		requestor.weavingAspects();		// first weave into aspects		for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {		    UnwovenClassFile classFile = (UnwovenClassFile)i.next();			String className = classFile.getClassName();		    BcelObjectType classType = BcelWorld.getBcelObjectType(world.resolve(className));		    if (classType.isAspect()) {		        weaveAndNotify(classFile, classType,requestor);		        wovenClassNames.add(className);		    }		}		requestor.weavingClasses();		// then weave into non-aspects		for (Iterator i = input.getClassFileIterator(); i.hasNext(); ) {		    UnwovenClassFile classFile = (UnwovenClassFile)i.next();			String className = classFile.getClassName();		    BcelObjectType classType = BcelWorld.getBcelObjectType(world.resolve(className));		    if (! classType.isAspect()) {		        weaveAndNotify(classFile, classType, requestor);		        wovenClassNames.add(className);		    }		}				addedClasses = new ArrayList();		deletedTypenames = new ArrayList();		requestor.weaveCompleted();		    	return wovenClassNames;    }