package jetbrains.mps.lang.structure.structure; /*Generated by MPS */ import java.util.List; import jetbrains.mps.internal.collections.runtime.ListSequence; import java.util.LinkedList; public enum StaticScope { global("global", null), root("containing root", "root"), none("none", "none"); private final String myName; public String getName() { return myName; } private final String myValue; private StaticScope(String name, String value) { myName = name; myValue = value; } public String getValue() { return myValue; } public String getValueAsString() { return myValue; } public static List<StaticScope> getConstants() { List<StaticScope> list = ListSequence.fromList(new LinkedList<StaticScope>()); ListSequence.fromList(list).addElement(StaticScope.global); ListSequence.fromList(list).addElement(StaticScope.root); ListSequence.fromList(list).addElement(StaticScope.none); return list; } public static StaticScope getDefault() { return StaticScope.global; } public static StaticScope parseValue(String value) { if (value == null) { return StaticScope.getDefault(); } if (value.equals(StaticScope.global.getValueAsString())) { return StaticScope.global; } if (value.equals(StaticScope.root.getValueAsString())) { return StaticScope.root; } if (value.equals(StaticScope.none.getValueAsString())) { return StaticScope.none; } return StaticScope.getDefault(); } }