Examples of PatternParser


Examples of org.aspectj.weaver.patterns.PatternParser

 
//  public TypePattern parseTypePattern(Parser parser) {
//  }
// 
  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

Examples of org.aspectj.weaver.patterns.PatternParser

      return null;
    }
  }
 
  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

Examples of org.aspectj.weaver.patterns.PatternParser

    // 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

Examples of org.aspectj.weaver.patterns.PatternParser

    if (pointcutExpression == null)
      pointcutExpression = getStringLiteralFor("value", adviceAnn, pcLocation);
    try {
      // +1 to give first char of pointcut string
      ISourceContext context = new EclipseSourceContext(unit.compilationResult, pcLocation[0] + 1);
      PatternParser pp = new PatternParser(pointcutExpression, context);
      Pointcut pc = pp.parsePointcut();
      pp.checkEof();
      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

Examples of org.aspectj.weaver.patterns.PatternParser

      Pointcut pc = null;// abstract
      if (pointcutExpression == null || pointcutExpression.length() == 0) {
        noValueSupplied = true; // matches nothing pointcut
      } else {
        noValueSupplied = false;
        pc = new PatternParser(pointcutExpression, context).parsePointcut();
      }
      pcDecl.pointcutDesignator = (pc == null) ? null : new PointcutDesignator(pc);
      pcDecl.setGenerateSyntheticPointcutMethod();
      TypeDeclaration onType = (TypeDeclaration) typeStack.peek();
      pcDecl.postParse(onType);
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser


  public AspectJTypeFilter(String typePatternExpression, ClassLoader classLoader) {
    this.world = new BcelWorld(classLoader, IMessageHandler.THROW, null);
    this.world.setBehaveInJava5Way(true);
    PatternParser patternParser = new PatternParser(typePatternExpression);
    TypePattern typePattern = patternParser.parseTypePattern();
    typePattern.resolve(this.world);
    IScope scope = new SimpleScope(this.world, new FormalBinding[0]);
    this.typePattern = typePattern.resolveBindings(scope, Bindings.NONE, false, false);
  }
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.