Package org.aspectj.ajdt.internal.core.builder

Examples of org.aspectj.ajdt.internal.core.builder.EclipseSourceContext


    return l;
  }
 
  protected void setMunger(ResolvedTypeMunger munger) {
    munger.getSignature().setPosition(sourceStart, sourceEnd);
    munger.getSignature().setSourceContext(new EclipseSourceContext(compilationResult));
    this.munger = munger;
  }
View Full Code Here


            declaredName,
      inWorld.fromBindings(this.binding.parameters),
      getPointcut()); //??? might want to use null
     
    resolvedPointcutDeclaration.setPosition(sourceStart, sourceEnd);
    resolvedPointcutDeclaration.setSourceContext(new EclipseSourceContext(compilationResult));
    return resolvedPointcutDeclaration;
  }
View Full Code Here

    String perClause = getStringLiteralFor("value", aspectAnnotation, pcLoc);
    AspectDeclaration aspectDecl = new AspectDeclaration(typeDecl.compilationResult);

    try {
      if (perClause != null && !perClause.equals("")) {
        ISourceContext context = new EclipseSourceContext(unit.compilationResult,pcLoc[0]);
        Pointcut pc = new PatternParser(perClause,context).maybeParsePerClause();
          FormalBinding[] bindings = new FormalBinding[0];
        if (pc != null) pc.resolve(new EclipseScope(bindings,typeDecl.scope));
      }
    } catch(ParserException pEx) {
View Full Code Here

    private void resolveAndSetPointcut(MethodDeclaration methodDeclaration, Annotation adviceAnn) {
    int[] pcLocation = new int[2];
    String pointcutExpression = getStringLiteralFor("pointcut",adviceAnn,pcLocation);
    if (pointcutExpression == null) pointcutExpression = getStringLiteralFor("value",adviceAnn,pcLocation);
    try {
      ISourceContext context = new EclipseSourceContext(unit.compilationResult,pcLocation[0]);
      Pointcut pc = new PatternParser(pointcutExpression,context).parsePointcut();
      FormalBinding[] bindings = buildFormalAdviceBindingsFrom(methodDeclaration);
      pc.resolve(new EclipseScope(bindings,methodDeclaration.scope));
      EclipseFactory factory = EclipseFactory.fromScopeLookupEnvironment(methodDeclaration.scope);
      // now create a ResolvedPointcutDefinition,make an attribute out of it, and add it to the method
View Full Code Here

 
    boolean containsIfPcd = false;
    int[] pcLocation = new int[2];
    String pointcutExpression = getStringLiteralFor("value",ajAnnotations.pointcutAnnotation,pcLocation);
    try {
      ISourceContext context = new EclipseSourceContext(unit.compilationResult,pcLocation[0]);
            Pointcut pc = null;//abstract
            if (pointcutExpression == null  || pointcutExpression.length() == 0) {
                ;//will have to ensure abstract ()V method
            } else {
                pc = new PatternParser(pointcutExpression,context).parsePointcut();
View Full Code Here

    this.factory = factory;
    this.binding = binding;
    this.declaration = declaration;
    this.unit = unit;
   
    resolvedTypeX.setSourceContext(new EclipseSourceContext(declaration.compilationResult));
    resolvedTypeX.setStartPos(declaration.sourceStart);
    resolvedTypeX.setEndPos(declaration.sourceEnd);
  }
View Full Code Here

          declaredPointcuts.add(df);
        } else {
          if (amd.binding == null || !amd.binding.isValidBinding()) continue;
          ResolvedMember member = factory.makeResolvedMember(amd.binding);
          if (unit != null) {
            member.setSourceContext(new EclipseSourceContext(unit.compilationResult,amd.binding.sourceStart()));
            member.setPosition(amd.binding.sourceStart(),amd.binding.sourceEnd());
          }
          declaredMethods.add(member);
        }
      }
View Full Code Here

            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.ajdt.internal.core.builder.EclipseSourceContext

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.