## org.aspectj.weaver.tools
Class PointcutParser

    java.lang.Object
      org.aspectj.weaver.tools.PointcutParser

public class PointcutParser
extends Object

A PointcutParser can be used to build PointcutExpressions for a user-defined subset of AspectJ's pointcut language

Constructor Summary
`PointcutParser()` Create a pointcut parser that can parse the full AspectJ pointcut language with the following exceptions: The `if, cflow, and cflowbelow` pointcut designators are not supported Pointcut expressions must be self-contained :- they cannot contain references to other named pointcuts The pointcut expression must be anonymous with no formals allowed.
`PointcutParser(Set supportedPointcutKinds)` Create a pointcut parser that can parse pointcut expressions built from a user-defined subset of AspectJ's supported pointcut primitives.

Method Summary
`static Set` `getAllSupportedPointcutPrimitives()`
`PointcutExpression` `parsePointcutExpression(String expression)` Parse the given pointcut expression.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PointcutParser

    public PointcutParser()

  Create a pointcut parser that can parse the full AspectJ pointcut language with the following exceptions:
  - The `if, cflow, and cflowbelow` pointcut designators are not supported
  - Pointcut expressions must be self-contained :- they cannot contain references to other named pointcuts
  - The pointcut expression must be anonymous with no formals allowed.

### PointcutParser

    public PointcutParser(Set supportedPointcutKinds)

  Create a pointcut parser that can parse pointcut expressions built from a user-defined subset of AspectJ's supported pointcut primitives. The following restrictions apply:
  - The `if, cflow, and cflowbelow` pointcut designators are not supported
  - Pointcut expressions must be self-contained :- they cannot contain references to other named pointcuts
  - The pointcut expression must be anonymous with no formals allowed.

Parameters:
  `supportedPointcutKinds` - a set of PointcutPrimitives this parser should support
Throws:
  `UnsupportedOperationException` - if the set contains if, cflow, or cflow below

Method Detail

### getAllSupportedPointcutPrimitives

    public static Set getAllSupportedPointcutPrimitives()

  Returns:
    a Set containing every PointcutPrimitive except if, cflow, and cflowbelow (useful for passing to PointcutParser constructor).

### parsePointcutExpression

    public PointcutExpression parsePointcutExpression(String expression)
                                               throws UnsupportedOperationException,
                                                      IllegalArgumentException

  Parse the given pointcut expression.

  Throws:
    `UnsupportedOperationException` - if the parser encounters a primitive pointcut expression of a kind not supported by this PointcutParser.
    `IllegalArgumentException` - if the expression is not a well-formed pointcut expression