package jetbrains.mps.kotlin.baseLanguage.toKotlin;

/*Generated by MPS */

import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import org.jetbrains.mps.openapi.language.SProperty;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;

public class JavaVariableHelper {
  public static String accessorNameOf(SNode method) {
    String name = SPropertyOperations.getString(method, PROPS.name$MnvL);
    if (name.length() <= 3) {
      return name;
    }

    // getSomethingDefined -> somethingDefined
    return name.substring(3, 4).toLowerCase() + name.substring(4);
  }

  private static final class PROPS {
    /*package*/ static final SProperty name$MnvL = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name");
  }
}
