I have a bit of code in a global listener that I would like to move into a function, hidden in a temporary class (also in the listener). One of the parameters is of type Annotation, described in the Engine api. However the code fails on cannot resolve the annotation class.
Is there a special way to reference the Annotation type declaration?
The engine classes (including the IP API) are hidden from the script classloader to protect the engine from uncontrolled access from scripts. This is why the Groovy compiler cannot load the classes, but it can still access specific instances if they are supplied by the engine.
In your case it should be enough to declare the parameter mAnnot as Object []: