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