01: /**************************************************************************************
02: * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package test.mixin.perjvm;
08:
09: import org.codehaus.aspectwerkz.definition.SystemDefinition;
10: import org.codehaus.aspectwerkz.definition.SystemDefinitionContainer;
11: import org.codehaus.aspectwerkz.definition.MixinDefinition;
12:
13: import java.util.Map;
14: import java.util.Iterator;
15:
16: /**
17: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
18: */
19: public class MyImpl implements Introductions {
20:
21: public static int s_count = 0;
22:
23: public static Map s_params;
24:
25: public MyImpl() {
26: s_count++;
27:
28: // access the param
29: SystemDefinition def = SystemDefinitionContainer
30: .getDefinitionFor(this .getClass().getClassLoader(),
31: "tests");
32: for (Iterator iterator = def.getMixinDefinitions().iterator(); iterator
33: .hasNext();) {
34: MixinDefinition mixinDefinition = (MixinDefinition) iterator
35: .next();
36: if (mixinDefinition.getMixinImpl().getName().equals(
37: this .getClass().getName().replace('/', '.'))) {
38: s_params = mixinDefinition.getParameters();
39: break;
40: }
41: }
42: }
43:
44: public void NOT_IN_MIXIN_INTF() {
45: }
46:
47: public void noArgs() {
48: return;
49: }
50:
51: public int intArg(int arg) {
52: return arg;
53: }
54:
55: }
|