for compatibility with CompileStatic, trigger cannot be defined outside
correct reference to groovy jar
able to run if we create a local variable trigger for the outer variable T