Class PostOrderDeserializer
- java.lang.Object
-
- com.oracle.truffle.api.nodes.serial.PostOrderDeserializer
-
public final class PostOrderDeserializer extends java.lang.Object
Experimental API. May change without notice.
-
-
Constructor Summary
Constructors Constructor Description PostOrderDeserializer(SerializerConstantPool cp)
Constructs a new serializer using a customSerializerConstantPool
implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Node>
Tdeserialize(byte[] bytes, java.lang.Class<T> expectedType)
Deserializes the byte stream and returns the deserialized Truffle AST node.
-
-
-
Constructor Detail
-
PostOrderDeserializer
public PostOrderDeserializer(SerializerConstantPool cp)
Constructs a new serializer using a customSerializerConstantPool
implementation. For theSerializerConstantPool
implementation at least the following methods must be implemented:
-
-
Method Detail
-
deserialize
public <T extends Node> T deserialize(byte[] bytes, java.lang.Class<T> expectedType) throws UnsupportedConstantPoolTypeException
Deserializes the byte stream and returns the deserialized Truffle AST node.- Parameters:
bytes
- the trimmed byte array containing the serialized dataexpectedType
- the expected root node type. Throws an exception if the root node is not assignable from this type.- Returns:
- the deserialized Truffle AST represented by the root Node.
- Throws:
UnsupportedConstantPoolTypeException
- thrown if a type is encountered that is not supported by the constant pool implementation.
-
-