Examples of parsePointcut()


Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

  }
 
  public Pointcut parsePointcut(Parser parser) {
    PatternParser patternParser = new PatternParser(tokenSource);
    try {
      Pointcut ret = patternParser.parsePointcut();
      checkEof(parser);
      return ret;
    } catch (ParserException pe) {
      reportError(parser, pe);
      return Pointcut.makeMatchesNothing(Pointcut.SYMBOLIC);
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

   * @return pointcut, unresolved
   */
  private static Pointcut parsePointcut(String pointcutString, AjAttributeStruct struct, boolean allowIf) {
    try {
      PatternParser parser = new PatternParser(pointcutString, struct.context);
      Pointcut pointcut = parser.parsePointcut();
      parser.checkEof();
      pointcut.check(null, struct.enclosingType.getWorld());
      if (!allowIf && pointcutString.indexOf("if()") >= 0 && hasIf(pointcut)) {
        reportError("if() pointcut is not allowed at this pointcut location '" + pointcutString + "'", struct);
        return null;
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

      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
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

   * @return pointcut, unresolved
   */
  private static Pointcut parsePointcut(String pointcutString, AjAttributeStruct struct, boolean allowIf) {
    try {
      PatternParser parser = new PatternParser(pointcutString, struct.context);
      Pointcut pointcut = parser.parsePointcut();
      parser.checkEof();
      pointcut.check(null, struct.enclosingType.getWorld());
      if (!allowIf && pointcutString.indexOf("if()") >= 0 && hasIf(pointcut)) {
        reportError("if() pointcut is not allowed at this pointcut location '" + pointcutString + "'", struct);
        return null;
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

  protected Pointcut resolvePointcutExpression(String expression, Class<?> inScope, PointcutParameter[] formalParameters) {
    try {
      PatternParser parser = new PatternParser(expression);
      parser.setPointcutDesignatorHandlers(pointcutDesignators, world);
      Pointcut pc = parser.parsePointcut();
      validateAgainstSupportedPrimitives(pc, expression);
      IScope resolutionScope = buildResolutionScope((inScope == null ? Object.class : inScope), formalParameters);
      pc = pc.resolve(resolutionScope);
      return pc;
    } catch (ParserException pEx) {
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

  protected Pointcut resolvePointcutExpression(String expression, Class inScope, PointcutParameter[] formalParameters) {
    try {
      PatternParser parser = new PatternParser(expression);
      parser.setPointcutDesignatorHandlers(pointcutDesignators, world);
      Pointcut pc = parser.parsePointcut();
      validateAgainstSupportedPrimitives(pc, expression);
      IScope resolutionScope = buildResolutionScope((inScope == null ? Object.class : inScope), formalParameters);
      pc = pc.resolve(resolutionScope);
      return pc;
    } catch (ParserException pEx) {
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

   * @return pointcut, unresolved
   */
  private static Pointcut parsePointcut(String pointcutString, AjAttributeStruct struct, boolean allowIf) {
    try {
      PatternParser parser = new PatternParser(pointcutString, struct.context);
      Pointcut pointcut = parser.parsePointcut();
      parser.checkEof();
      pointcut.check(null, struct.enclosingType.getWorld());
      if (!allowIf && pointcutString.indexOf("if()") >= 0 && hasIf(pointcut)) {
        reportError("if() pointcut is not allowed at this pointcut location '" + pointcutString + "'", struct);
        return null;
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

    throws UnsupportedPointcutPrimitiveException, IllegalArgumentException {
       PointcutExpressionImpl pcExpr = null;
         try {
           PatternParser parser = new PatternParser(expression);
           parser.setPointcutDesignatorHandlers(pointcutDesignators, world);
             Pointcut pc = parser.parsePointcut();
             validateAgainstSupportedPrimitives(pc,expression);
             IScope resolutionScope = buildResolutionScope((inScope == null ? Object.class : inScope),formalParameters);
             pc = pc.resolve(resolutionScope);
             ResolvedType declaringTypeForResolution = null;
             if (inScope != null) {
View Full Code Here

Examples of org.aspectj.weaver.patterns.PatternParser.parsePointcut()

  }
 
  public Pointcut parsePointcut(Parser parser) {
    PatternParser patternParser = new PatternParser(tokenSource);
    try {
      Pointcut ret = patternParser.parsePointcut();
      checkEof(parser);
      return ret;
    } catch (ParserException pe) {
      reportError(parser, pe);
      return Pointcut.makeMatchesNothing(Pointcut.SYMBOLIC);
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.