Class MCValueVoid

java.lang.Object
de.monticore.values.MCValueVoid
All Implemented Interfaces:
MCValue

public class MCValueVoid extends Object implements MCValue
Only used sparingly to avoid having to do too many case distinctions. It is not expected to operate on it like a real value.

Usually(TM), this is only used as a result of a full interpretation, and _not_ used within the interpreter itself.

This _could_ be removed, but is most likely not worth the effort.

  • Field Details

  • Constructor Details

    • MCValueVoid

      protected MCValueVoid()
  • Method Details

    • isVoid

      public boolean isVoid()
      Specified by:
      isVoid in interface MCValue
    • asNativeObject

      public Object asNativeObject() throws UnsupportedOperationException
      Description copied from interface: MCValue
      Used to pass the value to native Java classes and similar, e.g., collections.

      Note: not all values can have a native representation, as such, their native version is the MIValue itself.

      Specified by:
      asNativeObject in interface MCValue
      Returns:
      The value as a Java native Object.
      Throws:
      UnsupportedOperationException
    • printType

      public String printType()
      Description copied from interface: MCValue
      Print the type of the MIValue in human-readable form
      Specified by:
      printType in interface MCValue
    • printValue

      public String printValue()
      Description copied from interface: MCValue
      Print the value in human-readable form
      Specified by:
      printValue in interface MCValue
    • checkEqualityOperator

      public boolean checkEqualityOperator(MCValue other)
      Description copied from interface: MCValue
      basically implements ==
      Specified by:
      checkEqualityOperator in interface MCValue
      Parameters:
      other - the value to check against this
      Returns:
      whether they are considered equal