Checker.notNull("parameter:aspect", aspect);
final String id = aspect.getTarget();
final Bean bean = this.getBean(id);
final Type type = bean.getType();
final MethodMatcher matcher = aspect.getMethodMatcher();
final GeneratorContext context = this.getGeneratorContext();
context.branch();
context.debug("Discovering methods that match: " + matcher + " against " + type);
final List<Method> matchedMethods = new ArrayList<Method>();
final Type object = context.getObject();
final VirtualMethodVisitor visitor = new VirtualMethodVisitor() {
@Override
protected boolean visit(final Method method) {
while (true) {
if (method.isFinal()) {
if (false == method.getEnclosingType().equals(object)) {
BeanFactoryGenerator.this.throwTargetMethodIsFinal(method);
}
}
break;
}
if (method.getVisibility() == Visibility.PUBLIC && matcher.matches(method)) {
matchedMethods.add(method);
context.debug(method.toString());
}
return false;
}