PsiField[] (Collection<? extends PsiField> collectedFields, @NotNull TransformationContext context) { return collectedFields.stream() .filter(field -> { PsiModifierList modifierList = field.getModifierList(); if (modifierList instanceof GrModifierList) { return !context.hasModifierProperty((GrModifierList)modifierList, PsiModifier.STATIC); } else { return true; } }) .filter(field -> { PsiClass aClass = field.getContainingClass(); if (aClass == null || aClass.getQualifiedName() == null) { return false; } String name = aClass.getQualifiedName(); return !name.equals(GroovyCommonClassNames.GROOVY_OBJECT_SUPPORT) && !name.equals(GroovyCommonClassNames.GROOVY_OBJECT); }) .toArray(PsiField[]::new); }