eat(")");
return new PerCflow(entry, isBelow);
}
+
+ public boolean moreToParse() {
+ return tokenSource.hasMoreTokens();
+ }
private PerClause parsePerObject(boolean isThis) {
parseIdentifier();
String message = parsePossibleStringSequence(true);
return new DeclareErrorOrWarning(isError, pointcut, message);
}
+
+ public Pointcut parsePointcut(boolean shouldConsumeAllInput) {
+ Pointcut p = parsePointcut();
+ if (shouldConsumeAllInput && tokenSource.hasMoreTokens()) {
+ throw new ParserException(
+ "Found unexpected data after parsing pointcut",
+ tokenSource.next());
+ }
+ return p;
+ }
public Pointcut parsePointcut() {
Pointcut p = parseAtomicPointcut();
return p;
}
-
+
private Pointcut parseNotOrPointcut() {
Pointcut p = parseAtomicPointcut();
if (maybeEat("&&")) {
try {
PatternParser parser = new PatternParser(expression);
parser.setPointcutDesignatorHandlers(pointcutDesignators, world);
- Pointcut pc = parser.parsePointcut();
+ Pointcut pc = parser.parsePointcut(); // more correctly: parsePointcut(true)
validateAgainstSupportedPrimitives(pc, expression);
IScope resolutionScope = buildResolutionScope((inScope == null ? Object.class : inScope), formalParameters);
pc = pc.resolve(resolutionScope);