Represents a single function.
More...
Inherits BinNavi::APIHelpers::ApiObject< INaviFunction >.
List of all members.
Detailed Description
Function objects describe original functions from imported modules. This includes things like the name or the description of the function as well as the flowgraph of the function.
The structure of functions is immutable. That means the flowgraph of functions can not be modified. To modify the flowgraph of a function it is necessary to convert it to a View first.
Member Function Documentation
| void BinNavi.API.disassembly.Function.addListener |
( |
final IFunctionListener |
listener |
) |
|
Adds an object that is notified about changes in the function.
- Parameters:
-
| listener | The listener object that is notified about changes in the function. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the listener argument is null. |
| IllegalStateException | Thrown if the listener object is already listening on the function. |
| void BinNavi.API.disassembly.Function.close |
( |
|
) |
|
| Address BinNavi.API.disassembly.Function.getAddress |
( |
|
) |
|
Returns the start address of the function.
- Returns:
- The start address of the function.
| int BinNavi.API.disassembly.Function.getBlockCount |
( |
|
) |
|
Returns the number of basic blocks in the function. This function can be called if the function has not yet been loaded.
- Returns:
- The number of basic blocks in the function.
| String BinNavi.API.disassembly.Function.getComment |
( |
|
) |
|
Returns the function comment. This is the comment that is shown as the global comment in views that show function nodes.
- Returns:
- The function comment.
| String BinNavi.API.disassembly.Function.getDescription |
( |
|
) |
|
Returns the description of the function. This is the string that is shown as the description of the function in the main window.
- Returns:
- The function description.
| int BinNavi.API.disassembly.Function.getEdgeCount |
( |
|
) |
|
Returns the number of edges in the function. This function can be called if the function has not yet been loaded.
- Returns:
- The number of edges in the view.
| FlowGraph BinNavi.API.disassembly.Function.getGraph |
( |
|
) |
|
Returns the flowgraph of the function. This graph contains the basic blocks of the function and edges that show how control flow can propagate through the function.
- Returns:
- The flowgraph of the function.
- Exceptions:
-
| IllegalStateException | Thrown if the function is not loaded. |
| Module BinNavi.API.disassembly.Function.getModule |
( |
|
) |
|
Returns the module the function belongs to.
- Returns:
- The module the function belongs to.
| String BinNavi.API.disassembly.Function.getName |
( |
|
) |
|
Returns the name of the function.
- Returns:
- The name of the function.
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. |
Returns the type of the function.
- Returns:
- The type of the function.
| boolean BinNavi.API.disassembly.Function.isLoaded |
( |
|
) |
|
Returns a flag that indicates whether the function is loaded.
- Returns:
- True, if the function is loaded. False, otherwise.
Loads the function data from the database.
- Exceptions:
-
| IllegalStateException | Thrown if the function is already loaded. |
| CouldntLoadDataException | Thrown if the function data could not be loaded from the database. |
| void BinNavi.API.disassembly.Function.removeListener |
( |
final IFunctionListener |
listener |
) |
|
Removes a listener object from the function.
- Parameters:
-
| listener | The listener object to remove from the function. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the listener argument is null. |
| IllegalStateException | Thrown if the listener object was not listening on the function. |
Changes the comment of the function. This is the comment that is shown as the global comment in views that show function nodes.
- Parameters:
-
| comment | The new value of the comment. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the comment argument is null. |
| CouldntSaveDataException | Thrown if the comment could not be changed. |
Changes the description of the function.
- Parameters:
-
| description | The new value of the description. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the description argument is null. |
| CouldntSaveDataException | Thrown if the description could not be changed. |
Changes the name of the function.
- Parameters:
-
| name | The new value of the name. |
- Exceptions:
-
| IllegalArgumentException | Thrown if the name argument is null. |
| CouldntSaveDataException | Thrown if the name could not be changed. |
| String BinNavi.API.disassembly.Function.toString |
( |
|
) |
|
Returns the string representation of the function.
- Returns:
- The string representation of the function.