Class 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! Use SEnumerationAdapter that delegates to generated descriptors
    Provisional implementation of SEnumeration, backed-up by node<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
    • Constructor Detail

      • SEnumAdapter

        public SEnumAdapter()
        Deprecated.
        NULL value, when no enum found.
      • SEnumAdapter

        public SEnumAdapter​(SNode enumDeclaration)
        Deprecated.
    • Method Detail

      • fromString

        public Object fromString​(String value)
        Deprecated.
        Description copied from interface: SDataType
        Returns a value of this type that is represented with given string, or SType.NOT_A_VALUE if there is no value that is represented with given string.
        Specified by:
        fromString in interface SDataType
      • toString

        public String toString​(Object value)
        Deprecated.
        Description copied from interface: SDataType
        Returns textual representation of given value. Given value has to be an instance of this type.
        Specified by:
        toString in interface SDataType
      • getName

        @NotNull
        public String getName()
        Deprecated.
        Description copied from interface: SNamedElement
        Presentation of the element for an end-user. Unlike identity, the name is deemed user-friendly and shall not be used for persistence.
        Specified by:
        getName in interface SNamedElement
        Returns:
        name of the meta element
      • isInstanceOf

        public boolean isInstanceOf​(@Nullable
                                    Object value)
        Deprecated.
        Description copied from interface: SType
        Returns true if given values belongs to this type. Note that null can be an instance of some types.
        Specified by:
        isInstanceOf in interface SType
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Deprecated.
        Overrides:
        equals in class Object
      • getSourceNode

        @Nullable
        public SNodeReference getSourceNode()
        Deprecated.
        Description copied from interface: SElement
        Returns reference to the node, which was generated to this element. Should be used to language debug and navigation purposes.
        Specified by:
        getSourceNode in interface SElement