Examples of Pointcut


Examples of nexj.core.meta.Pointcut

   {
      List list = new ArrayList();

      while (itr.hasNext())
      {
         Pointcut pointcut = (Pointcut)itr.next();

         if (m_helper.isMatching(pointcut))
         {
            list.add(pointcut);
         }
View Full Code Here

Examples of org.aspectj.lang.reflect.Pointcut

  public Pointcut[] getDeclaredPointcuts() {
    if (declaredPointcuts != null) return declaredPointcuts;
    List<Pointcut> pointcuts = new ArrayList<Pointcut>();
    Method[] methods = clazz.getDeclaredMethods();
    for (Method method : methods) {
      Pointcut pc = asPointcut(method);
      if (pc != null) pointcuts.add(pc);
    }
    Pointcut[] ret = new Pointcut[pointcuts.size()];
    pointcuts.toArray(ret);
    declaredPointcuts = ret;
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

      DeclareSoft d = (DeclareSoft) declare;
      // Ordered so that during concretization we can check the related
      // munger
      ShadowMunger m = Advice.makeSoftener(world, d.getPointcut(), d.getException(), inAspect, d);
      m.setDeclaringType(d.getDeclaringType());
      Pointcut concretePointcut = d.getPointcut().concretize(inAspect, d.getDeclaringType(), 0, m);
      m.pointcut = concretePointcut;
      declareSofts.add(new DeclareSoft(d.getException(), concretePointcut));
      addConcreteShadowMunger(m);
    } else if (declare instanceof DeclareAnnotation) {
      // FIXME asc perf Possible Improvement. Investigate why this is
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

    return true;
  }

  private ShadowMunger rewritePointcutInMunger(ShadowMunger munger) {
    PointcutRewriter pr = new PointcutRewriter();
    Pointcut p = munger.getPointcut();
    Pointcut newP = pr.rewrite(p);
    if (p.m_ignoreUnboundBindingForNames.length != 0) {
      // *sigh* dirty fix for dirty hacky implementation pr149305
      newP.m_ignoreUnboundBindingForNames = p.m_ignoreUnboundBindingForNames;
    }
    munger.setPointcut(newP);
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

   * @param clause has been concretized at a higher level
   */
  @Override
  public ShadowMunger concretize(ResolvedType fromType, World world, PerClause clause) {
    // assert !fromType.isAbstract();
    Pointcut p = pointcut.concretize(fromType, getDeclaringType(), signature.getArity(), this);
    if (clause != null) {
      Pointcut oldP = p;
      p = new AndPointcut(clause, p);
      p.copyLocationFrom(oldP);
      p.state = Pointcut.CONCRETE;

      // FIXME ? ATAJ copy unbound bindings to ignore
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

      IProgramElement containingAspect, ResolvedMember[] pointcuts) {
    for (int i = 0; i < pointcuts.length; i++) {
      ResolvedMember pointcut = pointcuts[i];
      if (pointcut instanceof ResolvedPointcutDefinition) {
        ResolvedPointcutDefinition rpcd = (ResolvedPointcutDefinition) pointcut;
        Pointcut p = rpcd.getPointcut();
        ISourceLocation sLoc = (p == null ? null : p.getSourceLocation());
        if (sLoc == null) {
          sLoc = rpcd.getSourceLocation();
        }
        ISourceLocation pointcutLocation = (sLoc == null ? null : createSourceLocation(sourcefilename, aspect, sLoc));
        ProgramElement pointcutElement = new ProgramElement(model, pointcut.getName(), IProgramElement.Kind.POINTCUT,
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

  private static void addChildNodes(AsmManager asm, ResolvedType aspect, IProgramElement parent, ResolvedMember[] children) {
    for (int i = 0; i < children.length; i++) {
      ResolvedMember pcd = children[i];
      if (pcd instanceof ResolvedPointcutDefinition) {
        ResolvedPointcutDefinition rpcd = (ResolvedPointcutDefinition) pcd;
        Pointcut p = rpcd.getPointcut();
        ISourceLocation sLoc = (p == null ? null : p.getSourceLocation());
        if (sLoc == null) {
          sLoc = rpcd.getSourceLocation();
        }
        parent.addChild(new ProgramElement(asm, pcd.getName(), IProgramElement.Kind.POINTCUT, getBinarySourceLocation(
            aspect, sLoc), pcd.getModifiers(), null, Collections.EMPTY_LIST));
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

      return null; // there is another error that has caused this...
      // pr138143
    }

    EclipseSourceContext eSourceContext = new EclipseSourceContext(md.compilationResult);
    Pointcut pc = null;
    if (!md.isAbstract()) {
      String expression = getPointcutStringFromAnnotationStylePointcut(md);
      try {
        pc = new PatternParser(expression, eSourceContext).parsePointcut();
      } catch (ParserException pe) { // error will be reported by other
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

    super();
    sourceStart = tokens.sourceStart;
    sourceEnd = tokens.sourceEnd;
    this.tokens = tokens;

    Pointcut pc = tokens.parsePointcut(parser);
    if (pc.toString().equals("")) { // ??? is this a good signal
      isError = true;
    }
    pointcut = pc;
  }
View Full Code Here

Examples of org.aspectj.weaver.patterns.Pointcut

    return ret;
  }

  @Override
  public ShadowMunger parameterizeWith(ResolvedType declaringType, Map<String, UnresolvedType> typeVariableMap) {
    Pointcut pc = getPointcut().parameterizeWith(typeVariableMap, declaringType.getWorld());

    BcelAdvice ret = null;
    Member adviceSignature = signature;
    // allows for around advice where the return value is a type variable (see pr115250)
    if (signature instanceof ResolvedMember && signature.getDeclaringType().isGenericType()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.