// same order so we have
// to sort the method list before computation.
// @TODO: filter init/clinit/prefixed methods
final List sortedMethods = Arrays.asList(methods);
Collections.sort(sortedMethods, JavassistMethodComparator.getInstance());
final TObjectIntHashMap methodSequences = new TObjectIntHashMap();
final List sortedMethodTuples = new ArrayList(sortedMethods.size());
for (Iterator methodsIt = sortedMethods.iterator(); methodsIt.hasNext();) {
CtMethod method = (CtMethod) methodsIt.next();
MethodInfo methodInfo = JavassistMethodInfo.getMethodInfo(method, context.getLoader());
int sequence = 1;
if (methodSequences.containsKey(method.getName())) {
sequence = methodSequences.get(method.getName());
methodSequences.remove(method.getName());
sequence++;
}
methodSequences.put(method.getName(), sequence);
ExpressionContext ctx = new ExpressionContext(PointcutType.EXECUTION, methodInfo, methodInfo);
MethodSequenceTuple tuple = new MethodSequenceTuple(method, sequence);
int status = methodFilter(definitions, ctx, method);
tuple.setStatus(status);