CtField signature = CtField.make("public static String[] $" + behavior.getName() + "0 = new String[0];", ctClass);
ctClass.addField(signature);
continue;
}
StackAnalyzer parser = new StackAnalyzer(behavior);
// first, compute hash for parameter names
CtClass[] signatureTypes = behavior.getParameterTypes();
int memberShift = Modifier.isStatic(behavior.getModifiers()) ? 0 : 1;
if(signatureTypes.length > parser.context.localVariables.size() - memberShift) {
Logger.debug("ignoring method: %s %s (local vars numbers differs : %s != %s)", Modifier.toString(behavior.getModifiers()), behavior.getLongName(), signatureTypes.length, parser.context.localVariables.size() - memberShift);
continue;
}
StringBuffer signatureNames;
if(signatureTypes.length == 0)
signatureNames = new StringBuffer("new String[0];");
else {
signatureNames = new StringBuffer("new String[] {");
for(int i = memberShift; i < signatureTypes.length + memberShift; i++) {
if(i > memberShift)
signatureNames.append(",");
signatureNames.append("\"").append(parser.context.localVariables.get(i).name).append("\"");
}
signatureNames.append("};");
}
CtField signature = CtField.make("public static String[] $" + behavior.getName() + computeMethodHash(signatureTypes) + " = " + signatureNames.toString(), ctClass);
ctClass.addField(signature);
// end
Frames frames = parser.analyze();
CodeAttribute codeAttribute = behavior.getMethodInfo().getCodeAttribute();
FrameIterator iterator = frames.iterator();
while(iterator.hasNext()) {
Frame frame = iterator.next();
if(!frame.isAccessible) {