java.lang.Object
org.eclipse.milo.opcua.sdk.core.types.DynamicType
org.eclipse.milo.opcua.sdk.core.types.DynamicEnumType
All Implemented Interfaces:
org.eclipse.milo.opcua.stack.core.types.UaDataType, org.eclipse.milo.opcua.stack.core.types.UaEnumeratedType

public final class DynamicEnumType extends DynamicType implements org.eclipse.milo.opcua.stack.core.types.UaEnumeratedType
  • Constructor Details

    • DynamicEnumType

      public DynamicEnumType(DataType dataType, int value)
  • Method Details

    • getTypeId

      public org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId getTypeId()
      Specified by:
      getTypeId in interface org.eclipse.milo.opcua.stack.core.types.UaDataType
    • getValue

      public int getValue()
      Specified by:
      getValue in interface org.eclipse.milo.opcua.stack.core.types.UaEnumeratedType
    • getDataType

      public DataType getDataType()
      Description copied from class: DynamicType
      Get the DataType that defines this type.
      Specified by:
      getDataType in class DynamicType
      Returns:
      the DataType that defines this type.
    • getDataTypeDefinition

      public org.eclipse.milo.opcua.stack.core.types.structured.EnumDefinition getDataTypeDefinition()
      Description copied from class: DynamicType
      Get the DataTypeDefinition that defines this type.

      Subclasses may refine the return type to either EnumDefinition or StructureDefinition.

      Specified by:
      getDataTypeDefinition in class DynamicType
      Returns:
      the DataTypeDefinition that defines this type.
    • getName

      public String getName()
      Get the name associated with this enum value.
      Specified by:
      getName in interface org.eclipse.milo.opcua.stack.core.types.UaEnumeratedType
      Returns:
      the name associated with this enum value.
    • getDisplayName

      public org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText getDisplayName()
      Get the display name associated with this enum value.
      Returns:
      the display name associated with this enum value.
    • getDescription

      public org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText getDescription()
      Get the description associated with this enum value.
      Returns:
      the description associated with this enum value.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • newInstance

      public static DynamicEnumType newInstance(DataType dataType, int value)
      Create a new DynamicEnumType using the given DataType and value.
      Parameters:
      dataType - the DataType of the enum.
      value - the value of the enum.
      Returns:
      a new DynamicEnumType with the given DataType and value.
    • newInstanceFactory

      public static Function<Integer,DynamicEnumType> newInstanceFactory(DataType dataType)
      Create a new instance "factory" that produces new DynamicEnumType instances of the given DataType.
      Parameters:
      dataType - the DataType of the enum.
      Returns:
      a new instance "factory".