Package org.aspectj.weaver.patterns

Examples of org.aspectj.weaver.patterns.Declare


//  }
// 
  public Declare parseDeclare(Parser parser) {
    PatternParser patternParser = new PatternParser(tokenSource);
    try {
      Declare ret = patternParser.parseDeclare();
      checkEof(parser);
      return ret;
    } catch (ParserException pe) {
      reportError(parser, pe);
      return null;
View Full Code Here


  }
 
  public Declare parseAnnotationDeclare(Parser parser) {
    PatternParser patternParser = new PatternParser(tokenSource);
    try {
      Declare ret = patternParser.parseDeclareAnnotation();
      checkEof(parser);
      return ret;
    } catch (ParserException pe) {
      reportError(parser, pe);
      return null;
View Full Code Here

  }

  public ASTNode convert(DeclareDeclaration declareDecl) {
    checkCanceled(); // is this line needed?
    org.aspectj.org.eclipse.jdt.core.dom.DeclareDeclaration declareDeclaration = null;
    Declare declare = declareDecl.declareDecl;
    if (declare instanceof DeclareAnnotation) {
      DeclareAnnotation da = (DeclareAnnotation) declare;
      if (da.getKind().equals(DeclareAnnotation.AT_TYPE)) {
        declareDeclaration = new DeclareAtTypeDeclaration(this.ast);
        ((DeclareAtTypeDeclaration) declareDeclaration).setPatternNode(convert(da.getTypePattern()));
View Full Code Here

      while (typeIterator.hasNext()) {
        ResolvedType ty = typeIterator.next();
        // System.out.println("super: " + ty + ", " + );
        for (Iterator<Declare> i = ty.getDeclares().iterator(); i.hasNext();) {
          Declare dec = i.next();
          if (dec.isAdviceLike()) {
            if (includeAdviceLike) {
              ret.add(dec);
            }
          } else {
            ret.add(dec);
View Full Code Here

    // if (shouldAddUsesPointcut)
    // addUsesPointcutRelationsForNode(peNode, namedPointcuts, methodDeclaration);

    if (methodDeclaration instanceof DeclareDeclaration) {
      DeclareDeclaration dDeclaration = (DeclareDeclaration) methodDeclaration;
      Declare decl = dDeclaration.declareDecl;
      if (decl instanceof DeclareParents) {
        TypePatternList tpl = ((DeclareParents) decl).getParents();
        List<String> parents = new ArrayList<String>();
        for (int i = 0; i < tpl.size(); i++) {
          parents.add(tpl.get(i).getExactType().getName().replaceAll("\\$", "."));
View Full Code Here

  public void setAfterReturningAdviceKind(MethodDeclaration adviceDecl) {
    ((AdviceDeclaration) adviceDecl).kind = AdviceKind.AfterReturning;
  }

  public MethodDeclaration createDeclareDeclaration(CompilationResult result, ASTNode pseudoTokens, Parser parser) {
    Declare declare = ((PseudoTokens) pseudoTokens).parseDeclare(parser);
    return new DeclareDeclaration(result, declare);
  }
View Full Code Here

          EclipseTypeMunger m = ((InterTypeDeclaration) methods[i]).build(classScope);
          if (m != null) {
            concreteName.typeMungers.add(m);
          }
        } else if (methods[i] instanceof DeclareDeclaration) {
          Declare d = ((DeclareDeclaration) methods[i]).build(classScope);
          if (d != null) {
            concreteName.declares.add(d);
          }
        }
      }
View Full Code Here

    FormalBinding[] bindings = new org.aspectj.weaver.patterns.FormalBinding[0];
    IScope bindingScope = new BindingScope(getResolvedTypeX(), getResolvedTypeX().getSourceContext(), bindings);
    for (Iterator<AjAttribute> iter = attributeList.iterator(); iter.hasNext();) {
      AjAttribute a = iter.next();
      if (a instanceof AjAttribute.DeclareAttribute) {
        Declare decl = (((AjAttribute.DeclareAttribute) a).getDeclare());
        if (decl instanceof DeclareErrorOrWarning) {
          decl.resolve(bindingScope);
        } else if (decl instanceof DeclarePrecedence) {
          ((DeclarePrecedence) decl).setScopeForResolution(bindingScope);
        }
      }
    }
View Full Code Here

      while (typeIterator.hasNext()) {
        ResolvedType ty = typeIterator.next();
        // System.out.println("super: " + ty + ", " + );
        for (Iterator<Declare> i = ty.getDeclares().iterator(); i.hasNext();) {
          Declare dec = i.next();
          if (dec.isAdviceLike()) {
            if (includeAdviceLike) {
              ret.add(dec);
            }
          } else {
            ret.add(dec);
View Full Code Here

      while (typeIterator.hasNext()) {
        ResolvedType ty = typeIterator.next();
        // System.out.println("super: " + ty + ", " + );
        for (Iterator<Declare> i = ty.getDeclares().iterator(); i.hasNext();) {
          Declare dec = i.next();
          if (dec.isAdviceLike()) {
            if (includeAdviceLike) {
              ret.add(dec);
            }
          } else {
            ret.add(dec);
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.patterns.Declare

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.