@Override
  public void applyTransformation(@NotNull TransformationContext context) {
    final GrTypeDefinition codeClass = context.getCodeClass();
    if (codeClass.isInterface() && !codeClass.isTrait()) return;

    if (codeClass.isTrait() && codeClass.getQualifiedName() != null) {
      for (GrField field : codeClass.getCodeFields()) {
        context.addField(new GrTraitField(field, codeClass, PsiSubstitutor.EMPTY, context));
      }
    }

    process(context, (trait, substitutor) -> {
      if (trait instanceof GrTypeDefinition) {
        for (PsiMethod method : trait.getMethods()) {
          if ((((GrTypeDefinition)trait).isTrait() || method.getModifierList().hasExplicitModifier(PsiModifier.DEFAULT)) &&
              !method.getModifierList().hasExplicitModifier(PsiModifier.ABSTRACT) &&
              !method.getModifierList().hasExplicitModifier(PsiModifier.PRIVATE)) {
            context.addMethods(getExpandingMethods(codeClass, method, substitutor));
          }
        }
        for (GrField field : ((GrTypeDefinition)trait).getCodeFields()) {
          context.addField(new GrTraitField(field, codeClass, substitutor, context));
        }
      }
      else if (trait instanceof ClsClassImpl) {
        for (PsiMethod method : GrTraitUtil.getCompiledTraitConcreteMethods((ClsClassImpl)trait)) {
          context.addMethods(getExpandingMethods(codeClass, method, substitutor));
        }
        for (GrField field : GrTraitUtil.getCompiledTraitFields((ClsClassImpl)trait)) {
          context.addField(new GrTraitField(field, codeClass, substitutor, context));
        }
      }
    });
  }
@Override
  public void applyTransformation(@NotNull TransformationContext context)