Element pointcutDefElement = aspectElement.addElement("pointcut-def");
pointcutDefElement.addAttribute("name", pointcutDef.getName());
// TODO remove all non-reentrant things
//pointcutDefElement.addAttribute("non-reentrant", pointcutDef.getNonReentrant());
PointcutType pointcutType = pointcutDef.getType();
if (pointcutType.equals(PointcutType.EXECUTION)) {
pointcutDefElement.addAttribute("type", "method");
}
else if (pointcutType.equals(PointcutType.CALL)) {
pointcutDefElement.addAttribute("type", "callerSide");
}
else if (pointcutType.equals(PointcutType.GET)) {
pointcutDefElement.addAttribute("type", "getField");
}
else if (pointcutType.equals(PointcutType.SET)) {
pointcutDefElement.addAttribute("type", "setField");
}
else if (pointcutType.equals(PointcutType.CFLOW)) {
pointcutDefElement.addAttribute("type", "cflow");
}
else if (pointcutType.equals(PointcutType.THROWS)) {
pointcutDefElement.addAttribute("type", "throws");
}
else if (pointcutType.equals(PointcutType.CLASS)) {
pointcutDefElement.addAttribute("type", "class");
}
else {
throw new ExpressionException("pointcut type not supported: " + pointcutType);
}