package smodelLanguage.samples;

/*Generated by MPS */

import org.jetbrains.mps.openapi.model.SNode;
import java.util.List;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SProperty;
import org.jetbrains.mps.openapi.language.SReferenceLink;

public class Attributes {
  public void accessToNodeAttribute_1(SNode node) {
    List<SNode> macros = new IAttributeDescriptor.NodeAttribute(CONCEPTS.NodeMacro$qU).list(node);
    SNode firstMacro = ListSequence.fromList(new IAttributeDescriptor.NodeAttribute(CONCEPTS.NodeMacro$qU).list(node)).first();
  }
  public void accessToPropertyAttribute_1(SNode node) {
    SNode propertyMacro = new IAttributeDescriptor.PropertyAttribute(CONCEPTS.PropertyMacro$c9, PROPS.name$MnvL).get(node);
    SAbstractConcept concept = SNodeOperations.getConcept(new IAttributeDescriptor.PropertyAttribute(CONCEPTS.PropertyMacro$c9, PROPS.name$MnvL).get(node));
    SNode propertyMacro1 = new IAttributeDescriptor.PropertyAttribute(CONCEPTS.PropertyMacro$c9, PROPS.name$MnvL).get(node);
  }
  public void accessToPropertyAttribute_2(SNode node) {
    SNode propMacro = null;
    new IAttributeDescriptor.PropertyAttribute(CONCEPTS.PropertyMacro$c9, PROPS.name$MnvL).set(node, propMacro);
    new IAttributeDescriptor.PropertyAttribute(CONCEPTS.PropertyMacro$c9, PROPS.name$MnvL).set(node, propMacro);
    new IAttributeDescriptor.PropertyAttribute(CONCEPTS.PropertyMacro$c9, PROPS.name$MnvL).set(node, propMacro);
  }
  public void accessToReferenceAttribute_1(SNode node) {
    SNode referenceMacro = new IAttributeDescriptor.LinkAttribute(CONCEPTS.ReferenceMacro$30, LINKS.variableDeclaration$N1XG).get(node);
    SNode referenceMacro1 = new IAttributeDescriptor.LinkAttribute(CONCEPTS.ReferenceMacro$30, LINKS.variableDeclaration$N1XG).get(node);
  }
  public void accessToReferenceAttribute_2(SNode node) {
    SNode refMacro = null;
    new IAttributeDescriptor.LinkAttribute(CONCEPTS.ReferenceMacro$30, LINKS.variableDeclaration$N1XG).set(node, refMacro);
    new IAttributeDescriptor.LinkAttribute(CONCEPTS.ReferenceMacro$30, LINKS.variableDeclaration$N1XG).set(node, refMacro);
    new IAttributeDescriptor.LinkAttribute(CONCEPTS.ReferenceMacro$30, LINKS.variableDeclaration$N1XG).set(node, refMacro);
  }
  public void other(SNode node) {
    SNodeOperations.isAttribute(node);
    List<SNode> nodes = new IAttributeDescriptor.AllAttributes().list(node);
    SNode firstNode = ListSequence.fromList(new IAttributeDescriptor.AllAttributes().list(node)).first();
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept NodeMacro$qU = MetaAdapterFactory.getConcept(0xb401a68083254110L, 0x8fd384331ff25befL, 0xfd47ed6742L, "jetbrains.mps.lang.generator.structure.NodeMacro");
    /*package*/ static final SConcept PropertyMacro$c9 = MetaAdapterFactory.getConcept(0xb401a68083254110L, 0x8fd384331ff25befL, 0xfd47e9f6f0L, "jetbrains.mps.lang.generator.structure.PropertyMacro");
    /*package*/ static final SConcept ReferenceMacro$30 = MetaAdapterFactory.getConcept(0xb401a68083254110L, 0x8fd384331ff25befL, 0xfd7f44d616L, "jetbrains.mps.lang.generator.structure.ReferenceMacro");
  }

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

  private static final class LINKS {
    /*package*/ static final SReferenceLink variableDeclaration$N1XG = MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c77f1e98L, 0xf8cc6bf960L, "variableDeclaration");
  }
}
