Package de.monticore.values
Class MCValueVoid
java.lang.Object
de.monticore.values.MCValueVoid
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUsed to pass the value to native Java classes and similar, e.g., collections.booleancheckEqualityOperator(MCValue other) basically implements==booleanisVoid()Print the type of the MIValue in human-readable formPrint the value in human-readable formMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.monticore.values.MCValue
asBoolean, asByte, asChar, asDouble, asError, asFloat, asFunction, asInt, asLong, asObject, asShort, asString, isBoolean, isByte, isChar, isDouble, isError, isFloat, isFunction, isInt, isLong, isObject, isPrimitive, isShort, isSIUnit, isString
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
MCValueVoid
protected MCValueVoid()
-
-
Method Details
-
isVoid
public boolean isVoid() -
asNativeObject
Description copied from interface:MCValueUsed 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:
asNativeObjectin interfaceMCValue- Returns:
- The value as a Java native Object.
- Throws:
UnsupportedOperationException
-
printType
Description copied from interface:MCValuePrint the type of the MIValue in human-readable form -
printValue
Description copied from interface:MCValuePrint the value in human-readable form- Specified by:
printValuein interfaceMCValue
-
checkEqualityOperator
Description copied from interface:MCValuebasically implements==- Specified by:
checkEqualityOperatorin interfaceMCValue- Parameters:
other- the value to check against this- Returns:
- whether they are considered equal
-