@Override
  public void applyTransformation(@NotNull TransformationContext context) {
    GrTypeDefinition clazz = context.getCodeClass();
    if (!isApplicable(clazz)) return;

    final PsiManager manager = clazz.getManager();
    final GlobalSearchScope scope = clazz.getResolveScope();
    final JavaPsiFacade facade = JavaPsiFacade.getInstance(clazz.getProject());

    final PsiType pclType = facade.getElementFactory().createTypeByFQClassName(PCL_FQN, scope);
    final PsiArrayType pclArrayType = new PsiArrayType(pclType);
    final PsiType stringType = PsiType.getJavaLangString(manager, scope);
    final PsiType objectType = PsiType.getJavaLangObject(manager, scope);

    final List<LightMethodBuilder> methods = new ArrayList<>();

    methods.add(
      new LightMethodBuilder(manager, GroovyLanguage.INSTANCE, "addPropertyChangeListener")
        .setMethodReturnType(PsiTypes.voidType())
        .addParameter("listener", pclType)
    );

    methods.add(
      new LightMethodBuilder(manager, GroovyLanguage.INSTANCE, "addPropertyChangeListener")
        .setMethodReturnType(PsiTypes.voidType())
        .addParameter("name", stringType)
        .addParameter("listener", pclType)
    );

    methods.add(
      new LightMethodBuilder(manager, GroovyLanguage.INSTANCE, "removePropertyChangeListener")
        .setMethodReturnType(PsiTypes.voidType())
        .addParameter("listener", pclType)
    );

    methods.add(
      new LightMethodBuilder(manager, GroovyLanguage.INSTANCE, "removePropertyChangeListener")
        .setMethodReturnType(PsiTypes.voidType())
        .addParameter("name", stringType)
        .addParameter("listener", pclType)
    );

    methods.add(
      new LightMethodBuilder(manager, GroovyLanguage.INSTANCE, "firePropertyChange")
        .setMethodReturnType(PsiTypes.voidType())
        .addParameter("name", stringType)
        .addParameter("oldValue", objectType)
        .addParameter("newValue", objectType)
    );

    methods.add(
      new LightMethodBuilder(manager, GroovyLanguage.INSTANCE, "getPropertyChangeListeners")
        .setMethodReturnType(pclArrayType)
    );

    methods.add(
      new LightMethodBuilder(manager, GroovyLanguage.INSTANCE, "getPropertyChangeListeners")
        .setMethodReturnType(pclArrayType)
        .addParameter("name", stringType)
    );

    for (LightMethodBuilder method : methods) {
      method.addModifier(PsiModifier.PUBLIC);
      method.setOriginInfo(ORIGIN_INFO);
      method.putUserData(DOCUMENTATION_DELEGATE_FQN, PCS_FQN);
    }

    context.addMethods(methods);
  }
@Override
  public void applyTransformation(@NotNull TransformationContext context)