1 /*************************************************************************************** 2 * Copyright (c) Jonas Bonér, Alexandre Vasseur. All rights reserved. * 3 * http://aspectwerkz.codehaus.org * 4 * ---------------------------------------------------------------------------------- * 5 * The software in this package is published under the terms of the LGPL license * 6 * a copy of which has been included with this distribution in the license.txt file. * 7 **************************************************************************************/ 8 package org.codehaus.aspectwerkz.transform; 9 10 import java.util.Hashtable; 11 12 /*** 13 * Interface that all the weaving strategy implementations must implement. 14 * 15 * @author <a href="mailto:jboner@codehaus.org">Jonas Bonér </a> 16 */ 17 public interface WeavingStrategy { 18 19 /*** 20 * Defines the inlining weaving strategy. 21 */ 22 public static final int INLINING = 0; 23 24 /*** 25 * Defines the delegation weaving strategy. 26 */ 27 public static final int DELEGATION = 1; 28 29 /*** 30 * Initializes the transformer stack. 31 * 32 * @param params 33 */ 34 public abstract void initialize(final Hashtable params); 35 36 /*** 37 * @param className 38 * @param klass 39 * @param context 40 * @return 41 */ 42 public abstract void transform(final String className, final Context context); 43 44 /*** 45 * Creates a new transformation context. 46 * 47 * @param name 48 * @param bytecode 49 * @param loader 50 * @return 51 */ 52 public abstract Context newContext(final String name, final byte[] bytecode, final ClassLoader loader); 53 }