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.aspect;
9
10 /***
11 * Interface for that all mixin factories must implement.
12 *
13 * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
14 */
15 public interface MixinFactory {
16
17 /***
18 * Creates a new perJVM mixin instance, if it already exists then return it.
19 *
20 * @return the mixin instance
21 */
22 Object mixinOf();
23
24 /***
25 * Creates a new perClass mixin instance, if it already exists then return it.
26 *
27 * @param klass
28 * @return the mixin instance
29 */
30 Object mixinOf(Class klass);
31
32 /***
33 * Creates a new perInstance mixin instance, if it already exists then return it.
34 *
35 * @param instance
36 * @return the mixin instance
37 */
38 Object mixinOf(Object instance);
39 }