package jetbrains.mps.lang.behavior.behavior;

/*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;

/**
 * 
 * @deprecated 
 */
@Deprecated
public class BehaviorMethodNames {
  public static String BEHAVIOR_DESCRIPTOR_SUFFIX = "__BehaviorDescriptor";

  @Deprecated
  private BehaviorMethodNames() {
  }

  public static String getDeclarationName(SNode method) {
    SNode baseMethod = ConceptMethodDeclaration__BehaviorDescriptor.getOverridenMethod_idhP3pnNO.invoke(method);
    String prefix = (((baseMethod != null) ? "virtual" : "call")) + "_";
    return prefix + getMethodName(((baseMethod != null) ? baseMethod : method));
  }

  @Deprecated
  public static String getCallerMethodName(SNode method) {
    return "call_" + getMethodName(method);
  }

  @Deprecated
  public static String getSuperCallerMethodName(SNode method) {
    return "callSuper_" + getMethodName(method);
  }

  private static String getMethodName(SNode method) {
    return SPropertyOperations.getString(method, PROPS.name$MnvL) + "_" + method.getNodeId().toString();
  }

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