public void determineParameterNames() {
if ((bitflags & PARAMETER_NAMES_INITIALIZED) != 0) {
return;
}
bitflags |= PARAMETER_NAMES_INITIALIZED;
LocalVariableTable varTable = method.getLocalVariableTable();
int len = getArity();
if (varTable == null) {
// do we have an annotation with the argNames value specified...
AnnotationAJ[] annos = getAnnotations();
if (annos != null && annos.length != 0) {
AnnotationAJ[] axs = getAnnotations();
for (int i = 0; i < axs.length; i++) {
AnnotationAJ annotationX = axs[i];
String typename = annotationX.getTypeName();
if (typename.charAt(0) == 'o') {
if (typename.equals("org.aspectj.lang.annotation.Pointcut")
|| typename.equals("org.aspectj.lang.annotation.Before")
|| typename.equals("org.aspectj.lang.annotation.Around")
|| typename.startsWith("org.aspectj.lang.annotation.After")) {
AnnotationGen a = ((BcelAnnotation) annotationX).getBcelAnnotation();
if (a != null) {
List<NameValuePair> values = a.getValues();
for (NameValuePair nvPair : values) {
if (nvPair.getNameString().equals("argNames")) {
String argNames = nvPair.getValue().stringifyValue();
StringTokenizer argNameTokenizer = new StringTokenizer(argNames, " ,");
List<String> argsList = new ArrayList<String>();
while (argNameTokenizer.hasMoreTokens()) {
argsList.add(argNameTokenizer.nextToken());
}
int requiredCount = getParameterTypes().length;
while (argsList.size() < requiredCount) {
argsList.add("arg" + argsList.size());
}
setParameterNames(argsList.toArray(new String[] {}));
return;
}
}
}
}
}
}
}
setParameterNames(Utility.makeArgNames(len));
} else {
UnresolvedType[] paramTypes = getParameterTypes();
String[] paramNames = new String[len];
int index = Modifier.isStatic(modifiers) ? 0 : 1;
for (int i = 0; i < len; i++) {
LocalVariable lv = varTable.getLocalVariable(index);
if (lv == null) {
paramNames[i] = "arg" + i;
} else {
paramNames[i] = lv.getName();
}