package jetbrains.mps.build.mps.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.BehaviorRegistry; import jetbrains.mps.smodel.language.ConceptRegistry; 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.SModifiersImpl; import jetbrains.mps.core.aspects.behaviour.AccessPrivileges; import jetbrains.mps.build.util.UnpackHelper; import jetbrains.mps.build.util.DependenciesHelper; import java.util.List; import java.util.Arrays; import org.jetbrains.annotations.NotNull; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.build.behavior.BuildLayout_PathElement__BehaviorDescriptor; import jetbrains.mps.core.aspects.behaviour.api.SConstructor; import org.jetbrains.annotations.Nullable; import jetbrains.mps.core.aspects.behaviour.api.BHMethodNotFoundException; public final class BuildMpsLayout_ModuleJars__BehaviorDescriptor extends BaseBHDescriptor { private static final SAbstractConcept CONCEPT = MetaAdapterFactory.getConcept(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x11918e0f209b83e7L, "jetbrains.mps.build.mps.structure.BuildMpsLayout_ModuleJars"); private static final BehaviorRegistry REGISTRY = ConceptRegistry.getInstance().getBehaviorRegistry(); public static final SMethod<Void> unpack_id6IqTD4bJTWZ = new SMethodBuilder<Void>(new SJavaCompoundTypeImpl(Void.class)).name("unpack").modifiers(SModifiersImpl.create(8, AccessPrivileges.PUBLIC)).concept(CONCEPT).id("6IqTD4bJTWZ").registry(REGISTRY).build(SMethodBuilder.createJavaParameter(UnpackHelper.class, "")); public static final SMethod<String> location_id6b4RkXS8sT2 = new SMethodBuilder<String>(new SJavaCompoundTypeImpl(String.class)).name("location").modifiers(SModifiersImpl.create(8, AccessPrivileges.PUBLIC)).concept(CONCEPT).id("6b4RkXS8sT2").registry(REGISTRY).build(SMethodBuilder.createJavaParameter(DependenciesHelper.class, ""), SMethodBuilder.createJavaParameter(Object.class, "")); public static final SMethod<Boolean> exports_id5FtnUVJQES1 = new SMethodBuilder<Boolean>(new SJavaCompoundTypeImpl(Boolean.TYPE)).name("exports").modifiers(SModifiersImpl.create(8, AccessPrivileges.PUBLIC)).concept(CONCEPT).id("5FtnUVJQES1").registry(REGISTRY).build(SMethodBuilder.createJavaParameter(Object.class, "")); public static final SMethod<String> getSourceModuleJarName_id6v5CVv8csP9 = new SMethodBuilder<String>(new SJavaCompoundTypeImpl(String.class)).name("getSourceModuleJarName").modifiers(SModifiersImpl.create(0, AccessPrivileges.PUBLIC)).concept(CONCEPT).id("6v5CVv8csP9").registry(REGISTRY).build(); private static final List<SMethod<?>> BH_METHODS = Arrays.<SMethod<?>>asList(unpack_id6IqTD4bJTWZ, location_id6b4RkXS8sT2, exports_id5FtnUVJQES1, getSourceModuleJarName_id6v5CVv8csP9); private static void ___init___(@NotNull SNode __thisNode__) { } /*package*/ static void unpack_id6IqTD4bJTWZ(@NotNull SNode __thisNode__, UnpackHelper helper) { SNode parent = helper.parent(__thisNode__); String parentLocation = helper.getContentLocation(parent); String languageLocation = parentLocation + "/" + SPropertyOperations.getString(SLinkOperations.getTarget(__thisNode__, MetaAdapterFactory.getReferenceLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x11918e0f209b83e7L, 0x11918e0f209b83e9L, "module")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")) + ".jar"; helper.putLocation(__thisNode__, languageLocation); } /*package*/ static String location_id6b4RkXS8sT2(@NotNull SNode __thisNode__, DependenciesHelper helper, Object artifactId) { if (artifactId instanceof SNode) { SNode node = (SNode) artifactId; String languageLocation = helper.getLocation(__thisNode__); if (SNodeOperations.isInstanceOf(node, MetaAdapterFactory.getConcept(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x4c6db07d2e56a8b4L, "jetbrains.mps.build.mps.structure.BuildMps_Generator"))) { return languageLocation.substring(0, languageLocation.length() - ".jar".length()) + "-generator.jar"; } if (SNodeOperations.isInstanceOf(node, MetaAdapterFactory.getConcept(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x48e82d508331930cL, "jetbrains.mps.build.mps.structure.BuildMps_Module"))) { return languageLocation; } } return ((String) BuildLayout_PathElement__BehaviorDescriptor.location_id6b4RkXS8sT2.invokeSuper(__thisNode__, MetaAdapterFactory.getConcept(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x11918e0f209b83e7L, "jetbrains.mps.build.mps.structure.BuildMpsLayout_ModuleJars"), helper, artifactId)); } /*package*/ static boolean exports_id5FtnUVJQES1(@NotNull SNode __thisNode__, Object object) { if (object instanceof SNode) { SNode node = (SNode) object; if (SNodeOperations.isInstanceOf(node, MetaAdapterFactory.getConcept(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x4c6db07d2e56a8b4L, "jetbrains.mps.build.mps.structure.BuildMps_Generator"))) { return SLinkOperations.getTarget(__thisNode__, MetaAdapterFactory.getReferenceLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x11918e0f209b83e7L, 0x11918e0f209b83e9L, "module")) == BuildMps_Generator__BehaviorDescriptor.getSourceLanguage_id7YI57w6ZMdZ.invoke(SNodeOperations.cast(node, MetaAdapterFactory.getConcept(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x4c6db07d2e56a8b4L, "jetbrains.mps.build.mps.structure.BuildMps_Generator"))); } if (SNodeOperations.isInstanceOf(node, MetaAdapterFactory.getConcept(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x48e82d508331930cL, "jetbrains.mps.build.mps.structure.BuildMps_Module"))) { return SLinkOperations.getTarget(__thisNode__, MetaAdapterFactory.getReferenceLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x11918e0f209b83e7L, 0x11918e0f209b83e9L, "module")) == node; } } return false; } /*package*/ static String getSourceModuleJarName_id6v5CVv8csP9(@NotNull SNode __thisNode__) { return SPropertyOperations.getString(SLinkOperations.getTarget(__thisNode__, MetaAdapterFactory.getReferenceLink(0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x11918e0f209b83e7L, 0x11918e0f209b83e9L, "module")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")) + "-src.jar"; } /*package*/ BuildMpsLayout_ModuleJars__BehaviorDescriptor() { super(REGISTRY); } @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: unpack_id6IqTD4bJTWZ(node, (UnpackHelper) parameters[0]); return null; case 1: return (T) ((String) location_id6b4RkXS8sT2(node, (DependenciesHelper) parameters[0], (Object) parameters[1])); case 2: return (T) ((Boolean) exports_id5FtnUVJQES1(node, (Object) parameters[0])); case 3: return (T) ((String) getSourceModuleJarName_id6v5CVv8csP9(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; } }