GrAccessorMethod (GrField field) { PsiClass containingClass = field.getContainingClass(); if (containingClass == null) return null; PsiMethod[] setters = containingClass.findMethodsByName(GroovyPropertyUtils.getSetterName(field.getName()), false); for (PsiMethod setter : setters) { if (setter instanceof GrAccessorMethod) { return (GrAccessorMethod)setter; } } return null; }