diff options
author | aclement <aclement> | 2007-11-12 22:21:21 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-11-12 22:21:21 +0000 |
commit | 65b66f474dab1ef11b49738dfd57583d754babf4 (patch) | |
tree | c89716605d5c1c91a3d8ce5ac61974dae27139b3 | |
parent | a6396a59b5f3aee96577b09e4c283a026a76d845 (diff) | |
download | aspectj-65b66f474dab1ef11b49738dfd57583d754babf4.tar.gz aspectj-65b66f474dab1ef11b49738dfd57583d754babf4.zip |
pr194314: broken LV table, return arg name at shadow (for shadows where it makes sense)
-rw-r--r-- | weaver/src/org/aspectj/weaver/Shadow.java | 12 |
1 files changed, 12 insertions, 0 deletions
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(); |