void (final GrStatementOwner owner) { PsiElement child = owner.getFirstChild(); while (child != null) { if (child instanceof GroovyPsiElement) { ((GroovyPsiElement)child).accept(this); } child = child.getNextSibling(); } final GrStatement[] statements = owner.getStatements(); if (statements.length > 0) { handlePossibleReturn(statements[statements.length - 1]); } }