Class SEnumAdapter
- java.lang.Object
 - 
- jetbrains.mps.smodel.adapter.structure.SEnumAdapter
 
 
- 
- All Implemented Interfaces:
 SDataType,SElement,SEnumeration,SNamedElement,SType
@Deprecated public class SEnumAdapter extends Object implements SEnumeration
Deprecated.Do not use it!!! This class do not implement its contract! UseSEnumerationAdapterthat delegates to generated descriptorsProvisional implementation of SEnumeration, backed-up bynode<EnumerationDataTypeDeclaration>till we generate proper EnumDescriptor in structure aspect, add enum identity (optional). If we manage to do this in 2017.2, there's no need to keep SNode-based implementation.- Since:
 - 2017.2
 
 
- 
- 
Field Summary
- 
Fields inherited from interface org.jetbrains.mps.openapi.language.SType
NOT_A_VALUE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description SEnumAdapter()Deprecated.NULL value, when no enum found.SEnumAdapter(SNode enumDeclaration)Deprecated. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)Deprecated.ObjectfromString(String value)Deprecated.Returns a value of this type that is represented with given string, orSType.NOT_A_VALUEif there is no value that is represented with given string.SEnumerationLiteralgetDefault()Deprecated.Returns default value of the type.static StringgetEnumMemberIdentifier(SEnumerationLiteral enumMember)Deprecated.SLanguagegetLanguage()Deprecated.Language which the element belongs to.SEnumerationLiteralgetLiteral(String name)Deprecated.Resolves the enumeration literal with matching nameList<SEnumerationLiteral>getLiterals()Deprecated.StringgetName()Deprecated.Presentation of the element for an end-user.SNodeReferencegetSourceNode()Deprecated.Returns reference to the node, which was generated to this element.inthashCode()Deprecated.booleanisInstanceOf(Object value)Deprecated.Returnstrueif given values belongs to this type.StringtoString(Object value)Deprecated.Returns textual representation of given value. 
 - 
 
- 
- 
Constructor Detail
- 
SEnumAdapter
public SEnumAdapter()
Deprecated.NULL value, when no enum found. 
- 
SEnumAdapter
public SEnumAdapter(SNode enumDeclaration)
Deprecated. 
 - 
 
- 
Method Detail
- 
getLiterals
@NotNull public List<SEnumerationLiteral> getLiterals()
Deprecated.- Specified by:
 getLiteralsin interfaceSEnumeration- Returns:
 - ordered set of enumeration literals
 
 
- 
getLiteral
public SEnumerationLiteral getLiteral(String name)
Deprecated.Description copied from interface:SEnumerationResolves the enumeration literal with matching name- Specified by:
 getLiteralin interfaceSEnumeration
 
- 
getDefault
public SEnumerationLiteral getDefault()
Deprecated.Description copied from interface:STypeReturns default value of the type.- Specified by:
 getDefaultin interfaceSEnumeration- Specified by:
 getDefaultin interfaceSType
 
- 
fromString
public Object fromString(String value)
Deprecated.Description copied from interface:SDataTypeReturns a value of this type that is represented with given string, orSType.NOT_A_VALUEif there is no value that is represented with given string.- Specified by:
 fromStringin interfaceSDataType
 
- 
toString
public String toString(Object value)
Deprecated.Description copied from interface:SDataTypeReturns textual representation of given value. Given value has to be an instance of this type. 
- 
getName
@NotNull public String getName()
Deprecated.Description copied from interface:SNamedElementPresentation of the element for an end-user. Unlike identity, the name is deemed user-friendly and shall not be used for persistence.- Specified by:
 getNamein interfaceSNamedElement- Returns:
 - name of the meta element
 
 
- 
isInstanceOf
public boolean isInstanceOf(@Nullable Object value)
Deprecated.Description copied from interface:STypeReturnstrueif given values belongs to this type. Note thatnullcan be an instance of some types.- Specified by:
 isInstanceOfin interfaceSType
 
- 
getLanguage
@Nullable public SLanguage getLanguage()
Deprecated.Description copied from interface:SElementLanguage which the element belongs to.- Specified by:
 getLanguagein interfaceSElement
 
- 
getSourceNode
@Nullable public SNodeReference getSourceNode()
Deprecated.Description copied from interface:SElementReturns reference to the node, which was generated to this element. Should be used to language debug and navigation purposes.- Specified by:
 getSourceNodein interfaceSElement
 
- 
getEnumMemberIdentifier
public static String getEnumMemberIdentifier(SEnumerationLiteral enumMember)
Deprecated. 
 - 
 
 -