You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ZipFileWeaver.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://www.eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.bcel;
  13. import java.io.File;
  14. import java.io.IOException;
  15. //XXX delete very soon
  16. public class ZipFileWeaver {
  17. File inFile;
  18. public ZipFileWeaver(File inFile) {
  19. super();
  20. this.inFile = inFile;
  21. }
  22. public void weave(BcelWeaver weaver, File outFile) throws IOException {
  23. int count = 0;
  24. long startTime = System.currentTimeMillis();
  25. weaver.addJarFile(inFile, new File("."),false);
  26. weaver.weave(outFile);
  27. long stopTime = System.currentTimeMillis();
  28. System.out.println("handled " + count + " entries, in " +
  29. (stopTime-startTime)/1000. + " seconds");
  30. }
  31. }