Enum TransactionRuntime
- java.lang.Object
-
- java.lang.Enum<TransactionRuntime>
-
- com.casper.sdk.model.transaction.target.TransactionRuntime
-
- All Implemented Interfaces:
CasperSerializableObject,Tag,SerializableObject,java.io.Serializable,java.lang.Comparable<TransactionRuntime>
public enum TransactionRuntime extends java.lang.Enum<TransactionRuntime> implements CasperSerializableObject, Tag
The runtime used to execute a `Transaction`.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description VM_CASPER_V1The Casper Version 1 Virtual Machine.VM_CASPER_V2The Casper Version 2 Virtual Machine.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransactionRuntimefromJson(java.lang.String name)bytegetByteTag()java.lang.StringgetJsonName()bytegetTag()voidserialize(SerializerBuffer ser, Target target)Called when the object's values must be serializedstatic java.lang.StringtoJson(TransactionRuntime runtime)static TransactionRuntimevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TransactionRuntime[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.casper.sdk.model.clvalue.serde.CasperSerializableObject
serialize
-
-
-
-
Enum Constant Detail
-
VM_CASPER_V1
public static final TransactionRuntime VM_CASPER_V1
The Casper Version 1 Virtual Machine.
-
VM_CASPER_V2
public static final TransactionRuntime VM_CASPER_V2
The Casper Version 2 Virtual Machine.
-
-
Method Detail
-
values
public static TransactionRuntime[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TransactionRuntime c : TransactionRuntime.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransactionRuntime valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getByteTag
public byte getByteTag()
- Specified by:
getByteTagin interfaceTag
-
toJson
public static java.lang.String toJson(TransactionRuntime runtime)
-
fromJson
public static TransactionRuntime fromJson(java.lang.String name) throws NoSuchTypeException
- Throws:
NoSuchTypeException
-
serialize
public void serialize(SerializerBuffer ser, Target target) throws ValueSerializationException, NoSuchTypeException
Description copied from interface:CasperSerializableObjectCalled when the object's values must be serialized- Specified by:
serializein interfaceCasperSerializableObject- Parameters:
ser- the serializer to be usedtarget- target serialization standard- Throws:
ValueSerializationException- exception holding information of failure to serialize a valueNoSuchTypeException
-
getTag
public byte getTag()
-
getJsonName
public java.lang.String getJsonName()
-
-