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.

ClassPreProcessor.java 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*******************************************************************************
  2. * Copyright (c) 2005 Contributors.
  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://eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * Alexandre Vasseur initial implementation
  11. *******************************************************************************/
  12. package org.aspectj.weaver.loadtime;
  13. import java.security.ProtectionDomain;
  14. /**
  15. * Generic class pre processor interface that allows to separate the AspectJ 5 load time weaving from Java 5 JVMTI interfaces for
  16. * further use on Java 1.3 / 1.4
  17. *
  18. * @author Alexandre Vasseur
  19. */
  20. public interface ClassPreProcessor {
  21. /**
  22. * Post constructor initialization, usually empty
  23. */
  24. void initialize();
  25. /**
  26. * Weave
  27. *
  28. * @param className
  29. * @param bytes
  30. * @param classLoader
  31. * @param a protection domain that may be used for defining extraneous classes generated as part of modifying the one passed in
  32. * @return
  33. */
  34. byte[] preProcess(String className, byte[] bytes, ClassLoader classLoader, ProtectionDomain protectionDomain);
  35. }