package BHL1.behavior;

/*Generated by MPS */

import jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.core.aspects.behaviour.api.SMethod;
import jetbrains.mps.core.aspects.behaviour.SMethodBuilder;
import jetbrains.mps.core.aspects.behaviour.SJavaCompoundTypeImpl;
import jetbrains.mps.core.aspects.behaviour.AccessPrivileges;
import java.util.List;
import java.util.Arrays;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.mps.openapi.model.SNode;
import UtilSolution.util.TestResults;
import jetbrains.mps.core.aspects.behaviour.api.SConstructor;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.core.aspects.behaviour.api.BHMethodNotFoundException;

public final class A__BehaviorDescriptor extends BaseBHDescriptor {
  private static final SAbstractConcept CONCEPT = MetaAdapterFactory.getConcept(0x43359135f67c4a3dL, 0x9fdda3d7dba50995L, 0x54fc4b17de4f24cbL, "BHL1.structure.A");

  public static final SMethod<Integer> foo_id5jWiLvujMjC = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("foo").modifiers(8, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(6123852159203091688L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2();
  public static final SMethod<Boolean> varArgNull_id56Rew6rCKv6 = new SMethodBuilder<Boolean>(new SJavaCompoundTypeImpl(Boolean.TYPE)).name("varArgNull").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(5888238816390744006L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createVarArgPrm(String.class, ""));
  public static final SMethod<Boolean> arrArgNull_id56Rew6rCKDf = new SMethodBuilder<Boolean>(new SJavaCompoundTypeImpl(Boolean.TYPE)).name("arrArgNull").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(5888238816390744655L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(String[].class, ""));
  public static final SMethod<Integer> varArgLen_id6yTVdLqTssn = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("varArgLen").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7546323081797945111L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createVarArgPrm(String.class, ""));
  public static final SMethod<Integer> varArgPrim_id56Rew6rDMfR = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("varArgPrim").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(5888238816391013367L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createVarArgPrm(Integer.TYPE, ""));
  public static final SMethod<Integer> varArgLen2_id6yTVdLqUPAs = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("varArgLen2").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7546323081798310300L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createVarArgPrm(List[][].class, ""));
  public static final SMethod<Integer> varArgLen3_id6yTVdLqV1qL = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("varArgLen3").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7546323081798358705L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createVarArgPrm(List.class, ""));
  public static final SMethod<Integer> varArgLen4_id6Jh0tXoS5Ab = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("varArgLen4").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7768992890971249035L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createVarArgPrm(Integer.TYPE, ""));
  public static final SMethod<Integer> arrayArg_id6yTVdLqT_bJ = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("arrayArg").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7546323081797980911L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(String[].class, ""));
  public static final SMethod<Integer> arrayArg1_id6Jh0tXoSfUR = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("arrayArg1").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7768992890971291319L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(String[].class, ""), SMethodBuilder.createJavaParameter(String.class, ""));
  public static final SMethod<Integer> arrayArg2_id6yTVdLqTFk5 = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("arrayArg2").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7546323081798006021L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(String[][].class, ""));
  public static final SMethod<Integer> arrayArg3_id6Jh0tXoS5z0 = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("arrayArg3").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7768992890971248832L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(int[].class, ""));
  public static final SMethod<Long> longReturn_id20h3iLqUOkD = new SMethodBuilder<Long>(new SJavaCompoundTypeImpl(Long.TYPE)).name("longReturn").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(2310642567972865321L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2();
  public static final SMethod<Integer> boxing1_id95Aegakr_K = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.class)).name("boxing1").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(163705066661984624L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Integer.TYPE, ""));
  public static final SMethod<Integer> boxing2_id95AegakrCe = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("boxing2").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(163705066661984782L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Integer.class, ""));
  public static final SMethod<Integer> conversion1_id3ZhVC3HVCz2 = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("conversion1").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(4598718932037044418L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Float.TYPE, ""));
  public static final SMethod<Float> conversion2_id6rioTyS5hVU = new SMethodBuilder<Float>(new SJavaCompoundTypeImpl(Float.TYPE)).name("conversion2").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7409093844552457978L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Integer.TYPE, ""));
  public static final SMethod<Integer> conversion3_id6rioTyS5i4m = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.class)).name("conversion3").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7409093844552458518L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Float.TYPE, ""));
  public static final SMethod<Float> conversion4_id6rioTyS5icW = new SMethodBuilder<Float>(new SJavaCompoundTypeImpl(Float.class)).name("conversion4").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7409093844552459068L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Integer.TYPE, ""));
  public static final SMethod<Integer> conversion5_id6rioTyS5ilG = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("conversion5").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7409093844552459628L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Float.class, ""));
  public static final SMethod<Float> conversion6_id3HzlNjB44YK = new SMethodBuilder<Float>(new SJavaCompoundTypeImpl(Float.TYPE)).name("conversion6").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(4279359955658624944L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Integer.class, ""));
  public static final SMethod<Float> conversion0_id6rioTyS5hAT = new SMethodBuilder<Float>(new SJavaCompoundTypeImpl(Float.TYPE)).name("conversion0").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(7409093844552456633L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2(SMethodBuilder.createJavaParameter(Integer.TYPE, ""));
  public static final SMethod<Integer> conversion7_idjZ8XPdfKCq = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("conversion7").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(360045928603650586L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2();
  public static final SMethod<Integer> conversion8_idjZ8XPdg3mY = new SMethodBuilder<Integer>(new SJavaCompoundTypeImpl(Integer.TYPE)).name("conversion8").modifiers(0, AccessPrivileges.PUBLIC).concept(CONCEPT).baseMethodId(360045928603727294L).languageId(0x9fdda3d7dba50995L, 0x43359135f67c4a3dL).build2();

  private static final List<SMethod<?>> BH_METHODS = Arrays.<SMethod<?>>asList(foo_id5jWiLvujMjC, varArgNull_id56Rew6rCKv6, arrArgNull_id56Rew6rCKDf, varArgLen_id6yTVdLqTssn, varArgPrim_id56Rew6rDMfR, varArgLen2_id6yTVdLqUPAs, varArgLen3_id6yTVdLqV1qL, varArgLen4_id6Jh0tXoS5Ab, arrayArg_id6yTVdLqT_bJ, arrayArg1_id6Jh0tXoSfUR, arrayArg2_id6yTVdLqTFk5, arrayArg3_id6Jh0tXoS5z0, longReturn_id20h3iLqUOkD, boxing1_id95Aegakr_K, boxing2_id95AegakrCe, conversion1_id3ZhVC3HVCz2, conversion2_id6rioTyS5hVU, conversion3_id6rioTyS5i4m, conversion4_id6rioTyS5icW, conversion5_id6rioTyS5ilG, conversion6_id3HzlNjB44YK, conversion0_id6rioTyS5hAT, conversion7_idjZ8XPdfKCq, conversion8_idjZ8XPdg3mY);

  private static void ___init___(@NotNull SNode __thisNode__) {
  }

  /*package*/ static int foo_id5jWiLvujMjC(@NotNull SNode __thisNode__) {
    return TestResults.DEFAULT_RETURN_VALUE;
  }
  /*package*/ static boolean varArgNull_id56Rew6rCKv6(@NotNull SNode __thisNode__, String... args) {
    return args == null;
  }
  /*package*/ static boolean arrArgNull_id56Rew6rCKDf(@NotNull SNode __thisNode__, String[] args) {
    return args == null;
  }
  /*package*/ static int varArgLen_id6yTVdLqTssn(@NotNull SNode __thisNode__, String... strs) {
    return strs.length;
  }
  /*package*/ static int varArgPrim_id56Rew6rDMfR(@NotNull SNode __thisNode__, int... strs) {
    return strs.length;
  }
  /*package*/ static int varArgLen2_id6yTVdLqUPAs(@NotNull SNode __thisNode__, List<String[]>[][]... strs) {
    return strs.length;
  }
  /*package*/ static int varArgLen3_id6yTVdLqV1qL(@NotNull SNode __thisNode__, List<String[]>... strs) {
    return strs.length;
  }
  /*package*/ static int varArgLen4_id6Jh0tXoS5Ab(@NotNull SNode __thisNode__, int... ints) {
    return ints.length;
  }
  /*package*/ static int arrayArg_id6yTVdLqT_bJ(@NotNull SNode __thisNode__, String[] args) {
    return args.length;
  }
  /*package*/ static int arrayArg1_id6Jh0tXoSfUR(@NotNull SNode __thisNode__, String[] args, String arg) {
    return args.length;
  }
  /*package*/ static int arrayArg2_id6yTVdLqTFk5(@NotNull SNode __thisNode__, String[][] args) {
    return args.length;
  }
  /*package*/ static int arrayArg3_id6Jh0tXoS5z0(@NotNull SNode __thisNode__, int[] args) {
    return args.length;
  }
  /*package*/ static long longReturn_id20h3iLqUOkD(@NotNull SNode __thisNode__) {
    return 1;
  }
  /*package*/ static Integer boxing1_id95Aegakr_K(@NotNull SNode __thisNode__, int a) {
    return a;
  }
  /*package*/ static int boxing2_id95AegakrCe(@NotNull SNode __thisNode__, Integer a) {
    return a;
  }
  /*package*/ static int conversion1_id3ZhVC3HVCz2(@NotNull SNode __thisNode__, float f) {
    return (int) f;
  }
  /*package*/ static float conversion2_id6rioTyS5hVU(@NotNull SNode __thisNode__, int a) {
    return a;
  }
  /*package*/ static Integer conversion3_id6rioTyS5i4m(@NotNull SNode __thisNode__, float f) {
    return (int) f;
  }
  /*package*/ static Float conversion4_id6rioTyS5icW(@NotNull SNode __thisNode__, int a) {
    return (float) a;
  }
  /*package*/ static int conversion5_id6rioTyS5ilG(@NotNull SNode __thisNode__, Float f) {
    return (int) ((float) f);
  }
  /*package*/ static float conversion6_id3HzlNjB44YK(@NotNull SNode __thisNode__, Integer a) {
    return ((int) a);
  }
  /*package*/ static float conversion0_id6rioTyS5hAT(@NotNull SNode __thisNode__, int a) {
    // TODO write test
    return a;
  }
  /*package*/ static int conversion7_idjZ8XPdfKCq(@NotNull SNode __thisNode__) {
    return (int) ((float) A__BehaviorDescriptor.conversion0_id6rioTyS5hAT.invoke(__thisNode__, ((int) 1)));
  }
  /*package*/ static int conversion8_idjZ8XPdg3mY(@NotNull SNode __thisNode__) {
    return (int) ((float) A__BehaviorDescriptor.conversion0_id6rioTyS5hAT.invoke(__thisNode__, ((int) 1)));
  }

  /*package*/ A__BehaviorDescriptor() {
  }

  @Override
  protected void initNode(@NotNull SNode node, @NotNull SConstructor constructor, @Nullable Object[] parameters) {
    ___init___(node);
  }

  @Override
  protected <T> T invokeSpecial0(@NotNull SNode node, @NotNull SMethod<T> method, @Nullable Object[] parameters) {
    int methodIndex = BH_METHODS.indexOf(method);
    if (methodIndex < 0) {
      throw new BHMethodNotFoundException(this, method);
    }
    switch (methodIndex) {
      case 0:
        return (T) ((Integer) foo_id5jWiLvujMjC(node));
      case 1:
        return (T) ((Boolean) varArgNull_id56Rew6rCKv6(node, (String[]) parameters[0]));
      case 2:
        return (T) ((Boolean) arrArgNull_id56Rew6rCKDf(node, (String[]) parameters[0]));
      case 3:
        return (T) ((Integer) varArgLen_id6yTVdLqTssn(node, (String[]) parameters[0]));
      case 4:
        return (T) ((Integer) varArgPrim_id56Rew6rDMfR(node, (int[]) parameters[0]));
      case 5:
        return (T) ((Integer) varArgLen2_id6yTVdLqUPAs(node, (List<String[]>[][][]) parameters[0]));
      case 6:
        return (T) ((Integer) varArgLen3_id6yTVdLqV1qL(node, (List<String[]>[]) parameters[0]));
      case 7:
        return (T) ((Integer) varArgLen4_id6Jh0tXoS5Ab(node, (int[]) parameters[0]));
      case 8:
        return (T) ((Integer) arrayArg_id6yTVdLqT_bJ(node, (String[]) parameters[0]));
      case 9:
        return (T) ((Integer) arrayArg1_id6Jh0tXoSfUR(node, (String[]) parameters[0], (String) parameters[1]));
      case 10:
        return (T) ((Integer) arrayArg2_id6yTVdLqTFk5(node, (String[][]) parameters[0]));
      case 11:
        return (T) ((Integer) arrayArg3_id6Jh0tXoS5z0(node, (int[]) parameters[0]));
      case 12:
        return (T) ((Long) longReturn_id20h3iLqUOkD(node));
      case 13:
        return (T) ((Integer) boxing1_id95Aegakr_K(node, ((int) (Integer) parameters[0])));
      case 14:
        return (T) ((Integer) boxing2_id95AegakrCe(node, (Integer) parameters[0]));
      case 15:
        return (T) ((Integer) conversion1_id3ZhVC3HVCz2(node, ((float) (Float) parameters[0])));
      case 16:
        return (T) ((Float) conversion2_id6rioTyS5hVU(node, ((int) (Integer) parameters[0])));
      case 17:
        return (T) ((Integer) conversion3_id6rioTyS5i4m(node, ((float) (Float) parameters[0])));
      case 18:
        return (T) ((Float) conversion4_id6rioTyS5icW(node, ((int) (Integer) parameters[0])));
      case 19:
        return (T) ((Integer) conversion5_id6rioTyS5ilG(node, (Float) parameters[0]));
      case 20:
        return (T) ((Float) conversion6_id3HzlNjB44YK(node, (Integer) parameters[0]));
      case 21:
        return (T) ((Float) conversion0_id6rioTyS5hAT(node, ((int) (Integer) parameters[0])));
      case 22:
        return (T) ((Integer) conversion7_idjZ8XPdfKCq(node));
      case 23:
        return (T) ((Integer) conversion8_idjZ8XPdg3mY(node));
      default:
        throw new BHMethodNotFoundException(this, method);
    }
  }

  @Override
  protected <T> T invokeSpecial0(@NotNull SAbstractConcept concept, @NotNull SMethod<T> method, @Nullable Object[] parameters) {
    int methodIndex = BH_METHODS.indexOf(method);
    if (methodIndex < 0) {
      throw new BHMethodNotFoundException(this, method);
    }
    switch (methodIndex) {
      default:
        throw new BHMethodNotFoundException(this, method);
    }
  }

  @NotNull
  @Override
  public List<SMethod<?>> getDeclaredMethods() {
    return BH_METHODS;
  }

  @NotNull
  @Override
  public SAbstractConcept getConcept() {
    return CONCEPT;
  }
}
