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 test.mixin.perjvm;
9
10 import org.codehaus.aspectwerkz.definition.SystemDefinition;
11 import org.codehaus.aspectwerkz.definition.SystemDefinitionContainer;
12 import org.codehaus.aspectwerkz.definition.MixinDefinition;
13
14 import java.util.Map;
15 import java.util.Iterator;
16
17 /***
18 * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
19 */
20 public class MyImpl implements Introductions {
21
22 public static int s_count = 0;
23
24 public static Map s_params;
25
26 public MyImpl() {
27 s_count++;
28
29
30 SystemDefinition def = SystemDefinitionContainer.getDefinitionFor(
31 this.getClass().getClassLoader(),
32 "tests"
33 );
34 for (Iterator iterator = def.getMixinDefinitions().iterator(); iterator.hasNext();) {
35 MixinDefinition mixinDefinition = (MixinDefinition) iterator.next();
36 if (mixinDefinition.getMixinImpl().getName().equals(this.getClass().getName().replace('/','.'))) {
37 s_params = mixinDefinition.getParameters();
38 break;
39 }
40 }
41 }
42
43 public void NOT_IN_MIXIN_INTF() {
44 }
45
46 public void noArgs() {
47 return;
48 }
49
50 public int intArg(int arg) {
51 return arg;
52 }
53
54 }
55