boolean containsIfPcd = false;
int[] pcLocation = new int[2];
String pointcutExpression = getStringLiteralFor("value",ajAnnotations.pointcutAnnotation,pcLocation);
try {
ISourceContext context = new EclipseSourceContext(unit.compilationResult,pcLocation[0]);
Pointcut pc = null;//abstract
if (pointcutExpression == null || pointcutExpression.length() == 0) {
;//will have to ensure abstract ()V method
} else {
pc = new PatternParser(pointcutExpression,context).parsePointcut();
}
pcDecl.pointcutDesignator = (pc==null)?null:new PointcutDesignator(pc);
pcDecl.setGenerateSyntheticPointcutMethod();
TypeDeclaration onType = (TypeDeclaration) typeStack.peek();
pcDecl.postParse(onType);
// EclipseFactory factory = EclipseFactory.fromScopeLookupEnvironment(methodDeclaration.scope);
// int argsLength = methodDeclaration.arguments == null ? 0 : methodDeclaration.arguments.length;
FormalBinding[] bindings = buildFormalAdviceBindingsFrom(methodDeclaration);
// FormalBinding[] bindings = new FormalBinding[argsLength];
// for (int i = 0, len = bindings.length; i < len; i++) {
// Argument arg = methodDeclaration.arguments[i];
// String name = new String(arg.name);
// UnresolvedType type = factory.fromBinding(methodDeclaration.binding.parameters[i]);
// bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd, "unknown");
// }
swap(onType,methodDeclaration,pcDecl);
if (pc != null) {
// has an expression
pc.resolve(new EclipseScope(bindings,methodDeclaration.scope));
HasIfPCDVisitor ifFinder = new HasIfPCDVisitor();
pc.traverse(ifFinder, null);
containsIfPcd = ifFinder.containsIfPcd;
}
} catch(ParserException pEx) {
methodDeclaration.scope.problemReporter().parseError(
pcLocation[0] + pEx.getLocation().getStart(),