Inherits com::google::security::zynamics::binnavi::APIHelpers::ApiObject< INaviView >.
List of all members.
Detailed Description
Views are arbitrary graphs that can be displayed. In most cases views are either flowgraphs and callgraphs that can be shown in com.google.security.zynamics.binnavi. The nodes of a view are not limited to one kind though. A view can have different kinds of nodes and if you work on the nodes of a view you have to be aware of this.
Common node types are CodeNode objects which are the view equivalent of basic blocks and FunctionNode which are the equivalent of callgraph nodes.
Member Function Documentation
void com.google.security.zynamics.binnavi.API.disassembly.View.addListener |
( |
final IViewListener |
listener |
) |
|
Adds an object that is notified about changes in the view.
- Parameters:
-
| listener | The listener object that is notified about changes in the view. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the listener argument is null. |
| IllegalStateException | Thrown if the listener object is already listening on the view. |
Tags the view with a tag.
- Parameters:
-
| tag | The tag used to tag the view. |
- Exceptions:
-
boolean com.google.security.zynamics.binnavi.API.disassembly.View.close |
( |
|
) |
|
Closed the view. This operation can be vetoed by other plugins or parts of com.google.security.zynamics.binnavi.
- Returns:
- True, if the view was closed. False, if the close operation was vetoed.
CodeNode com.google.security.zynamics.binnavi.API.disassembly.View.createCodeNode |
( |
final Function |
function, |
|
|
final List< Instruction > |
instructions | |
|
) |
| | |
Creates a code node in the view.
- Parameters:
-
| function | The parent function of the code node. This argument is optional can can be null. |
| instructions | The instructions that should be displayed in the code node. |
- Returns:
- The created code node.
Creates an edge in the view.
- Parameters:
-
| source | The source node of the edge. |
| target | The target node of the edge. |
| edgeType | The edge type of the edge. |
- Returns:
- The created edge.
FunctionNode com.google.security.zynamics.binnavi.API.disassembly.View.createFunctionNode |
( |
final Function |
function |
) |
|
Creates a function node in the view.
- Parameters:
-
| function | The function the function node represents. |
- Returns:
- The created function node.
GroupNode com.google.security.zynamics.binnavi.API.disassembly.View.createGroupNode |
( |
final String |
text, |
|
|
final List< ViewNode > |
elements | |
|
) |
| | |
Creates a new group node in the view.
- Parameters:
-
| text | Text that is shown when the group node is collapsed. |
| elements | Nodes that belong to the group node. |
- Returns:
- The created group node.
ViewNode com.google.security.zynamics.binnavi.API.disassembly.View.createNode |
( |
final ViewNode |
node |
) |
|
Creates a new view node by cloning an existing view node.
- Parameters:
-
- Returns:
- The cloned node.
TextNode com.google.security.zynamics.binnavi.API.disassembly.View.createTextNode |
( |
final ArrayList< IComment > |
comments |
) |
|
creates a new text node.
- Parameters:
-
| comments | The list of comments to fill the text node with. |
- Returns:
- The newly generated text node.
void com.google.security.zynamics.binnavi.API.disassembly.View.deleteEdge |
( |
final ViewEdge |
edge |
) |
|
Deletes an edge from the view.
- Parameters:
-
void com.google.security.zynamics.binnavi.API.disassembly.View.deleteNode |
( |
final ViewNode |
node |
) |
|
Deletes a node from the view.
- Parameters:
-
ViewContainer com.google.security.zynamics.binnavi.API.disassembly.View.getContainer |
( |
|
) |
|
Returns the container of the view. This can be either a project or a module.
- Returns:
- The container of the view.
String com.google.security.zynamics.binnavi.API.disassembly.View.getDescription |
( |
|
) |
|
Returns the description of the view.
- Returns:
- The description of the view.
int com.google.security.zynamics.binnavi.API.disassembly.View.getEdgeCount |
( |
|
) |
|
Returns the number of edges in the view. This function can be called if the view has not yet been loaded.
- Returns:
- The number of edges in the view.
ViewGraph com.google.security.zynamics.binnavi.API.disassembly.View.getGraph |
( |
|
) |
|
Returns the graph of the view. This is the visible part of the view that is displayed in the graph windows of com.google.security.zynamics.binnavi.
- Returns:
- The graph of the view.
- Exceptions:
-
| IllegalStateException | Thrown if the view is not loaded. |
GraphType com.google.security.zynamics.binnavi.API.disassembly.View.getGraphType |
( |
|
) |
|
Returns the type of the view graph. The graph of a view can either be a flowgraph (if all nodes of the graph are of type CodeNode), a callgraph (if all nodes of the graph are of type FunctionNode), or a mixed graph (if the graph contains arbitrarily mixed nodes).
- Returns:
- The type of the graph.
String com.google.security.zynamics.binnavi.API.disassembly.View.getName |
( |
|
) |
|
Returns the name of the view.
- Returns:
- The name of the view.
int com.google.security.zynamics.binnavi.API.disassembly.View.getNodeCount |
( |
|
) |
|
Returns the number of nodes in the view. This function can be called if the view has not yet been loaded.
- Returns:
- The number of nodes in the view.
Converts the View to REIL code. This function can only be used if the view has already been loaded.
Using this function over manual translation via ReilTranslator has the advantage that REIL translation results are automatically cached. Subsequent uses of this function requires no additional re-translation of the view provided that nothing relevant (like added/removed code nodes) changed.
- Returns:
- The REIL representation of the view.
- Exceptions:
-
| InternalTranslationException | Thrown if the REIL translation failed. |
List<Tag> com.google.security.zynamics.binnavi.API.disassembly.View.getTags |
( |
|
) |
|
Returns all tags that are currently associated with the view.
- Returns:
- The tags of the view.
ViewType com.google.security.zynamics.binnavi.API.disassembly.View.getType |
( |
|
) |
|
Returns the type of the view. A view can be either native (i.e. an immutable view created by the importer) or non-native (i.e. a mutable view created by the user).
- Returns:
- The type of the view.
boolean com.google.security.zynamics.binnavi.API.disassembly.View.isLoaded |
( |
|
) |
|
Returns a flag that indicates whether the view data has been loaded from the database.
- Returns:
- True, if the view has been loaded. False, otherwise.
Loads the view data from the database.
- Exceptions:
-
| IllegalStateException | Thrown if the view is already loaded. |
| CouldntLoadDataException | Thrown if the data could not be loaded from the database. |
| PartialLoadException | Thrown if the view could not be loaded because not all involved modules could be loaded. |
void com.google.security.zynamics.binnavi.API.disassembly.View.removeListener |
( |
final IViewListener |
listener |
) |
|
Removes a listener object from the view.
- Parameters:
-
| listener | The listener object to remove from the view. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the listener argument is null. |
| IllegalStateException | Thrown if the listener object was not listening on the database. |
Removes a tag from the view.
- Parameters:
-
| tag | The tag to remove from the view. |
- Exceptions:
-
Saves the view to the database. Please note that only non-native views can be saved using this function.
- Exceptions:
-
void com.google.security.zynamics.binnavi.API.disassembly.View.setDescription |
( |
final String |
description |
) |
throws CouldntSaveDataException |
Changes the description of the view.
- Parameters:
-
| description | The new description of the view. |
- Exceptions:
-
void com.google.security.zynamics.binnavi.API.disassembly.View.setName |
( |
final String |
name |
) |
throws CouldntSaveDataException |
Changes the name of the view.
- Parameters:
-
| name | The new name of the view. |
- Exceptions:
-
String com.google.security.zynamics.binnavi.API.disassembly.View.toString |
( |
|
) |
|
Returns the string representation of the view.
- Returns:
- The string representation of the view.