Package rocket.beans.rebind.aop

Examples of rocket.beans.rebind.aop.MethodMatcher


    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;
      }
View Full Code Here

TOP

Related Classes of rocket.beans.rebind.aop.MethodMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.