Package org.aspectj.weaver

Examples of org.aspectj.weaver.ResolvedPointcutDefinition


      for (int i=0, len=methods.length; i < len; i++) {
        AbstractMethodDeclaration amd = methods[i];
        if (amd == null || amd.ignoreFurtherInvestigation) continue;
        if (amd instanceof PointcutDeclaration) {
          PointcutDeclaration d = (PointcutDeclaration)amd;
          ResolvedPointcutDefinition df = d.makeResolvedPointcutDefinition(factory);
          declaredPointcuts.add(df);
        } else if (amd instanceof InterTypeDeclaration) {       
          // these are handled in a separate pass
          continue;
        } else if (amd instanceof DeclareDeclaration &&
                   !(amd instanceof DeclareAnnotationDeclaration)) { // surfaces the annotated ajc$ method
          // these are handled in a separate pass
          continue;
        } else if (amd instanceof AdviceDeclaration) {
          // these are ignored during compilation and only used during weaving
          continue;
        else if ((amd.annotations != null) && isAnnotationStylePointcut(amd.annotations)) {
          // consider pointcuts defined via annotations
          ResolvedPointcutDefinition df = makeResolvedPointcutDefinition(amd);
          declaredPointcuts.add(df);
        } else {
          if (amd.binding == null || !amd.binding.isValidBinding()) continue;
          ResolvedMember member = factory.makeResolvedMember(amd.binding);
          if (unit != null) {
View Full Code Here


    this.declaredFields = (ResolvedMember[])
      declaredFields.toArray(new ResolvedMember[declaredFields.size()]);
  }

  private ResolvedPointcutDefinition makeResolvedPointcutDefinition(AbstractMethodDeclaration md) {
    ResolvedPointcutDefinition resolvedPointcutDeclaration = new ResolvedPointcutDefinition(
            factory.fromBinding(md.binding.declaringClass),
            md.modifiers,
            new String(md.selector),
      factory.fromBindings(md.binding.parameters),
      null); //??? might want to use null
     
    resolvedPointcutDeclaration.setPosition(md.sourceStart, md.sourceEnd);
    resolvedPointcutDeclaration.setSourceContext(new EclipseSourceContext(md.compilationResult));
    return resolvedPointcutDeclaration;
  }
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.ResolvedPointcutDefinition

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.