Package com.oracle.truffle.api.nodes.serial

## 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
`PostOrderDeserializer​(SerializerConstantPool cp)` Constructs a new serializer using a custom `SerializerConstantPool` implementation.

### Method Summary

All Methods Instance Methods Concrete Methods
`<T extends Node> T` `deserialize​(byte[] bytes, java.lang.Class<T> expectedType)` Deserializes the byte stream and returns the deserialized Truffle AST node.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PostOrderDeserializer

    public PostOrderDeserializer​(SerializerConstantPool cp)

Constructs a new serializer using a custom `SerializerConstantPool` implementation. For the `SerializerConstantPool` implementation at least the following methods must be implemented:

- `SerializerConstantPool.getInt(int)`
- `SerializerConstantPool.getClass(int)`

### 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 data
  `expectedType` - 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.