G - the type of graph this instance handlesM - the type of methods this instance handlespublic final class GraphOutput<G,M> extends Object implements Closeable, WritableByteChannel
WritableByteChannel is implemented| Modifier and Type | Class and Description |
|---|---|
static class |
GraphOutput.Builder<G,N,M>
Builder to configure and create an instance of
GraphOutput. |
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_VM_ID
Name of stream attribute to identify the VM execution, allows to join different GraphOutput
streams.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginGroup(G forGraph,
String name,
String shortName,
M method,
int bci,
Map<? extends Object,? extends Object> properties)
Begins a compilation group.
|
void |
close()
Closes the output.
|
void |
endGroup()
Ends compilation group.
|
boolean |
isOpen()
Checks if the
GraphOutput is open. |
static <G,N,C,P> GraphOutput.Builder<G,N,?> |
newBuilder(GraphStructure<G,N,C,P> structure)
Creates new builder to configure a future instance of
GraphOutput. |
void |
print(G graph,
Map<? extends Object,? extends Object> properties,
int id,
String format,
Object... args)
Prints a single graph.
|
int |
write(ByteBuffer src)
Writes raw bytes into
GraphOutput. |
public static final String ATTR_VM_ID
GraphOutputs.public static <G,N,C,P> GraphOutput.Builder<G,N,?> newBuilder(GraphStructure<G,N,C,P> structure)
GraphOutput.G - the type of the graphN - the type of the nodesC - the type of the node classesP - the type of the portsstructure - description of the structure of the graphpublic void beginGroup(G forGraph, String name, String shortName, M method, int bci, Map<? extends Object,? extends Object> properties) throws IOException
forGraph - name - shortName - method - bci - properties - IOExceptionpublic void print(G graph, Map<? extends Object,? extends Object> properties, int id, String format, Object... args) throws IOException
graph - properties - id - format - args - IOExceptionpublic void endGroup()
throws IOException
IOExceptionpublic void close()
public boolean isOpen()
GraphOutput is open.isOpen in interface ChannelGraphOutput is open.public int write(ByteBuffer src) throws IOException
GraphOutput.write in interface WritableByteChannelsrc - the bytes to writeIOException - in case of IO error