public abstract class AbstractASTTransformation implements Opcodes, ASTTransformation {
private SourceUnit sourceUnit;
protected void init(ASTNode[] nodes, SourceUnit sourceUnit) {
if (nodes.length != 2 || !(nodes[0] instanceof AnnotationNode) || !(nodes[1] instanceof AnnotatedNode)) {
throw new GroovyBugError("Internal error: expecting [AnnotationNode, AnnotatedNode] but got: " + Arrays.asList(nodes));
}
this.sourceUnit = sourceUnit;
}