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 implementedModifier 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
GraphOutput
s.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
- IOException
public void print(G graph, Map<? extends Object,? extends Object> properties, int id, String format, Object... args) throws IOException
graph
- properties
- id
- format
- args
- IOException
public void endGroup() throws IOException
IOException
public void close()
public boolean isOpen()
GraphOutput
is open.isOpen
in interface Channel
GraphOutput
is open.public int write(ByteBuffer src) throws IOException
GraphOutput
.write
in interface WritableByteChannel
src
- the bytes to writeIOException
- in case of IO error