Explicit typing in groovy script

I tried to build up some data structure / classes like shown below in a groovy-ScriptTask.
Script is running in a groovy-online-ide, but putting it into the bpmn-ScriptTask there’s an error with the
typing of the ArrayList<!Layer >.
The bpmn-modeller thinks the <!Layer> is a new xml-tag and doesn’t interpret this as an typed ArrayList within the script, so it demands a <!/Layer>… which of course doesn’t make sense.
How can I solve this?

Attention, I put the “!” after every <, otherwise this editor here isn’t displaying the content between the <>

class Layer {
def String type;
def long amountOfHoles;
class Twin {
def long id;
def layerList = new ArrayList<!Layer >();