o.getMethod().getCode().getCodeString());
}
-}
+ private boolean calculatedTriviality = false;
+ private boolean isTrivial = false;
+ public boolean isTrivial() {
+ if (calculatedTriviality) return isTrivial; // dont do it more than once for a method!
+ isTrivial = Utility.isSimple(method);
+ calculatedTriviality=true;
+ return isTrivial;
+ }
+
+
+}
\ No newline at end of file
world.getMessageHandler().handleMessage(m);
}
}
+ if (node.getKind()==Shadow.MethodExecution) {
+ if (!world.isJoinpointTrivialEnabled() &&
+ node.getSignature().getModifiers().concernedWithTriviality()) {
+ IMessage m = MessageUtil.warn("Use of 'trivial' modifier in the execution() pointcut is not allowed without the option -Xjoinpoints:trivial",
+ p.getSourceLocation());
+ world.getMessageHandler().handleMessage(m);
+ }
+ }
return super.visit(node, data);
}