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.annotation;
9
10 import org.codehaus.aspectwerkz.util.SequencedHashMap;
11 import org.codehaus.aspectwerkz.aspect.AdviceType;
12
13 import java.util.Map;
14 import java.util.Set;
15
16 /***
17 * The advice annotation proxy base.
18 *
19 * @author <a href="mailto:jboner@codehaus.org">Jonas Bonér </a>
20 * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur </a>
21 */
22 public class AdviceAnnotationProxyBase extends UntypedAnnotationProxy implements ParameterizedAnnotationProxy {
23
24 protected String m_pointcut;
25 protected AdviceType m_type;
26
27 protected final Map m_argsTypeByName = new SequencedHashMap();
28
29 public String pointcut() {
30 return m_pointcut;
31 }
32
33 public void setValue(final String value) {
34 m_pointcut = value;
35 }
36
37 public void addArgument(String argName, String className) {
38 m_argsTypeByName.put(argName, className);
39 }
40
41 public Set getArgumentNames() {
42 return m_argsTypeByName.keySet();
43 }
44
45 public String getArgumentType(String parameterName) {
46 return (String) m_argsTypeByName.get(parameterName);
47 }
48
49 public AdviceType getType() {
50 return m_type;
51 }
52 }