How to find out whether I am in edit mode or not in Java rendering macros?

Hello everybody,
with XWiki 16.8.0, if I am in the execute method of a Java rendering macro, how do I find out whether I am in edit mode or not?

Many thanks in advance.

Hello. See https://www.xwiki.org/xwiki/bin/view/FAQ/How%20to%20write%20Macro%20code%20for%20the%20edit%20mode