From: aclement Date: Mon, 12 Nov 2007 22:21:21 +0000 (+0000) Subject: pr194314: broken LV table, return arg name at shadow (for shadows where it makes... X-Git-Tag: V1_5_4rc1~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=65b66f474dab1ef11b49738dfd57583d754babf4;p=aspectj.git pr194314: broken LV table, return arg name at shadow (for shadows where it makes sense) --- diff --git a/weaver/src/org/aspectj/weaver/Shadow.java b/weaver/src/org/aspectj/weaver/Shadow.java index 1add44522..26f021298 100644 --- a/weaver/src/org/aspectj/weaver/Shadow.java +++ b/weaver/src/org/aspectj/weaver/Shadow.java @@ -187,6 +187,18 @@ public abstract class Shadow { return getSignature() .getParameterTypes().length; } + + /** + * Return name of the argument at position 'i' at this shadow. This does not + * make sense for all shadows - but can be useful in the case of, for example, + * method-execution. + * @return null if it cannot be determined + */ + public String getArgName(int i,World w) { + String [] names = getSignature().getParameterNames(w); + if (names==null || i>=names.length) return null; + return names[i]; + } public abstract UnresolvedType getEnclosingType();