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

## Class PostOrderSerializer

- java.lang.Object
- - com.oracle.truffle.api.nodes.serial.PostOrderSerializer

    public final class PostOrderSerializer
    extends java.lang.Object

Experimental API. May change without notice.

### Constructor Summary

Constructors
`PostOrderSerializer​(SerializerConstantPool cp)` Constructs a new deserializer using a custom `SerializerConstantPool` implementation.

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `serialize​(Node node)` Serializes the node AST and returns the serialized data as byte array.

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

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

### Constructor Detail

#### PostOrderSerializer

    public PostOrderSerializer​(SerializerConstantPool cp)

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

- `SerializerConstantPool.putInt(int)`
- `SerializerConstantPool.putClass(Class)`

### Method Detail

#### serialize

    public byte[] serialize​(Node node)
                     throws UnsupportedConstantPoolTypeException

Serializes the node AST and returns the serialized data as byte array.

Parameters:
  `node` - the root node that represents the Truffle AST that should be serialized.
Returns:
  a trimmed byte array that contains the serialized data.
Throws:
  `UnsupportedConstantPoolTypeException` - thrown if a type is encountered that is not supported by the constant pool implementation.