Public Member Functions

com.google.security.zynamics.binnavi.API.disassembly.CodeNode Class Reference

Inheritance diagram for com.google.security.zynamics.binnavi.API.disassembly.CodeNode:
com.google.security.zynamics.binnavi.API.disassembly.ViewNode

List of all members.

Public Member Functions

Instruction addInstruction (final Instruction instruction)
void addListener (final ICodeNodeListener listener)
void addListener (final IViewNodeListener listener)
void addTag (final Tag tag) throws CouldntSaveDataException
List< IComment > appendGlobalComment (final String comment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException, com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException
List< IComment > appendLocalComment (final String comment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException, com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException
List< IComment > appendLocalInstructionComment (final Instruction instruction, final String comment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException, com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException
void deleteGlobalComment (final IComment comment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException
void deleteLocalComment (final IComment comment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException
void deleteLocalInstructionComment (final Instruction instruction, final IComment comment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException
IComment editGlobalComment (final IComment comment, final String newComment)
IComment editLocalComment (final IComment comment, final String newComment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException
IComment editLocalInstructionComment (final Instruction instruction, final IComment comment, final String newComment) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException
Address getAddress ()
Color getBorderColor ()
List< ViewNodegetChildren ()
Color getColor ()
List< IComment > getGlobalComments ()
List< ViewEdgegetIncomingEdges ()
List< InstructiongetInstructions ()
List< IComment > getLocalComments ()
List< ViewEdgegetOutgoingEdges ()
GroupNode getParentGroup ()
List< ViewNodegetParents ()
ReilGraph getReilCode () throws InternalTranslationException
List< TaggetTags ()
double getX ()
double getY ()
void initializeGlobalComment (final List< IComment > comments)
void initializeLocalComment (final List< IComment > comments)
void initializeLocalInstructionComment (final Instruction instruction, final List< IComment > comments)
boolean isSelected ()
boolean isTagged (final Tag tag)
boolean isVisible ()
void removeInstruction (final Instruction instruction)
void removeListener (final IViewNodeListener listener)
void removeListener (final ICodeNodeListener listener)
void removeTag (final Tag tag) throws CouldntSaveDataException
void setBorderColor (final Color color)
void setColor (final Color color)
void setInstructionColor (final Instruction instruction, final int level, final Color color)
void setSelected (final boolean selection)
void setX (final double newX)
void setY (final double newY)
String toString ()

Detailed Description

A code node is a node that can be part of view graphs. Each code node represents a basic block.


Member Function Documentation

Instruction com.google.security.zynamics.binnavi.API.disassembly.CodeNode.addInstruction ( final Instruction  instruction  ) 

Adds an instruction to the code node. The instruction is appended at the end of the code node.

Please note that not the instruction object you pass to the function is added to the code node. Rather, a copy of the passed instruction object is made and added to the code node. This guarantees that each instruction object appears only once in a view.

Parameters:
instruction The instruction to add to the code node.
Returns:
The instruction object that was really added to the code node.
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.addListener ( final ICodeNodeListener  listener  ) 

Adds a listener object that is notified about changes in the code node.

Parameters:
listener The listener that is added to the code node.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.addListener ( final IViewNodeListener  listener  )  [inherited]

Adds a listener object that is notified about changes in the view node.

Parameters:
listener The listener that is added to the view node.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.addTag ( final Tag  tag  )  throws CouldntSaveDataException [inherited]

Tags a node with a given tag.

Parameters:
tag The tag that is added to the node.
Exceptions:
CouldntSaveDataException Thrown if the node could not be tagged.
List<IComment> com.google.security.zynamics.binnavi.API.disassembly.CodeNode.appendGlobalComment ( final String  comment  )  throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException, com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException

Append a global code node comment.

Parameters:
comment The String comment to append.
Returns:
The List of global comments currently associated to the code node if append operation was successful null otherwise.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException 
com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException 
List<IComment> com.google.security.zynamics.binnavi.API.disassembly.CodeNode.appendLocalComment ( final String  comment  )  throws com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException, com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException

Append a global code node comment.

Parameters:
comment The comment string for the new comment to append.
Returns:
The list of currently associated global comments of the code node after the append operation on success null on failure.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException 
com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException 
List<IComment> com.google.security.zynamics.binnavi.API.disassembly.CodeNode.appendLocalInstructionComment ( final Instruction  instruction,
final String  comment 
) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException, com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException

Append a local instruction comment.

Parameters:
instruction The instruction to which the comment will be associated.
comment The text for the comment to append.
Returns:
The list of local comments currently associated to the instruction after the append operation was successful.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException 
com.google.security.zynamics.binnavi.API.disassembly.CouldntLoadDataException 
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.deleteGlobalComment ( final IComment  comment  )  throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException

Delete a global code node comment.

Parameters:
comment The IComment to delete.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException 
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.deleteLocalComment ( final IComment  comment  )  throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException

Delete a local code node comment.

Parameters:
comment The IComment to delete.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException 
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.deleteLocalInstructionComment ( final Instruction  instruction,
final IComment  comment 
) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException

Delete a local instruction comment.

Parameters:
instruction The instruction the comment is currently associated to.
comment The comment to delete.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntDeleteException 
IComment com.google.security.zynamics.binnavi.API.disassembly.CodeNode.editGlobalComment ( final IComment  comment,
final String  newComment 
)

Edit a global code node comment.

Parameters:
comment The IComment to be edited.
newComment The String to replace the comment text.
Returns:
The edited IComment.
IComment com.google.security.zynamics.binnavi.API.disassembly.CodeNode.editLocalComment ( final IComment  comment,
final String  newComment 
) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException

Edit a local code node comment.

Parameters:
comment The comment which is edited.
newComment The new comment string to replace the old comment string.
Returns:
The edited comment.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException 
IComment com.google.security.zynamics.binnavi.API.disassembly.CodeNode.editLocalInstructionComment ( final Instruction  instruction,
final IComment  comment,
final String  newComment 
) throws com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException

Edit a local instruction comment.

Parameters:
instruction The Instruction to which the comment is associated.
comment The IComment which is edited.
newComment The String to edit the comment with.
Returns:
The edited IComment if successful null otherwise.
Exceptions:
com.google.security.zynamics.binnavi.API.disassembly.CouldntSaveDataException 
Address com.google.security.zynamics.binnavi.API.disassembly.CodeNode.getAddress (  ) 

Returns the address of the code node. The address of a code node equals the address of the first instruction of the code node.

Returns:
The address of the code node.
Color com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getBorderColor (  )  [inherited]

Returns the current border color of the node.

Returns:
The current border color of the node.
List<ViewNode> com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getChildren (  )  [inherited]

Returns the nodes of the view that are reachable by following the outgoing edges of the view node.

Returns:
The reachable children of the view node.
Color com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getColor (  )  [inherited]

Returns the current background color of the node.

Returns:
The current background color of the node.
List<IComment> com.google.security.zynamics.binnavi.API.disassembly.CodeNode.getGlobalComments (  ) 

Returns the global comment associated with the code node.

Returns:
The global comment associated with the code node.
List<ViewEdge> com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getIncomingEdges (  )  [inherited]

Returns the incoming edges of the view node.

Returns:
The incoming edges of the view node.
List<Instruction> com.google.security.zynamics.binnavi.API.disassembly.CodeNode.getInstructions (  ) 
Returns:
The instructions of the code node.
List<IComment> com.google.security.zynamics.binnavi.API.disassembly.CodeNode.getLocalComments (  ) 

Returns the local comment associated with the code node.

Returns:
The local comment associated with the code node.
List<ViewEdge> com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getOutgoingEdges (  )  [inherited]

Returns the ougoing edges of the view node.

Returns:
The outgoing edges of the view node.
GroupNode com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getParentGroup (  )  [inherited]

Returns the group node in which the node is contained. If the node does not belong to any group, the return value of this method is null.

Returns:
Parent group node of the node or null.
List<ViewNode> com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getParents (  )  [inherited]

Returns the nodes of the view that are reachable by following the incoming edges of the view node.

Returns:
The reachable parents of the view node.
ReilGraph com.google.security.zynamics.binnavi.API.disassembly.CodeNode.getReilCode (  )  throws InternalTranslationException

Converts the code node to REIL code.

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 code node provided that nothing relevant (like added/removed code nodes) changed.

Returns:
The REIL representation of the instruction.
Exceptions:
InternalTranslationException Thrown if the REIL translation failed.
List<Tag> com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getTags (  )  [inherited]

Returns the tags that are currently associated with the node.

Returns:
A list of tags.
double com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getX (  )  [inherited]

Returns the current X position of the node in the view.

Returns:
The current X position of the node in the view.
double com.google.security.zynamics.binnavi.API.disassembly.ViewNode.getY (  )  [inherited]

Returns the current Y position of the node in the view.

Returns:
The current Y position of the node in the view.
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.initializeGlobalComment ( final List< IComment >  comments  ) 

Initializes the global code node comments.

Parameters:
comments The list of IComment to associate to the code node.
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.initializeLocalComment ( final List< IComment >  comments  ) 

Initializes the local code node comments.

Parameters:
comments The List of IComment to associate to the code node.
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.initializeLocalInstructionComment ( final Instruction  instruction,
final List< IComment >  comments 
)

Initialize the local instruction comments.

Parameters:
instruction The instruction to associate the comments with.
comments The List of IComment to associate to the Instruction.
boolean com.google.security.zynamics.binnavi.API.disassembly.ViewNode.isSelected (  )  [inherited]

Determines whether the node is selected or not.

Returns:
True, if the node is selected. False, otherwise.
boolean com.google.security.zynamics.binnavi.API.disassembly.ViewNode.isTagged ( final Tag  tag  )  [inherited]

Determines whether the node is tagged with a given tag.

Parameters:
tag The tag that is checked.
Returns:
True, if the node is tagged with the tag. False, otherwise.
Exceptions:
IllegalArgumentException Thrown if the tag argument is null.
boolean com.google.security.zynamics.binnavi.API.disassembly.ViewNode.isVisible (  )  [inherited]

Determines whether the node is visible or not.

Returns:
True, if the node is visible. False, otherwise.
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.removeInstruction ( final Instruction  instruction  ) 

Removes an instruction from the code node.

Parameters:
instruction The instruction to remove from the code node.
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.removeListener ( final ICodeNodeListener  listener  ) 

Removes a listener object from the code node.

Parameters:
listener The listener that is removed from the code node.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.removeListener ( final IViewNodeListener  listener  )  [inherited]

Removes a listener object from the view node.

Parameters:
listener The listener object to remove from the node.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.removeTag ( final Tag  tag  )  throws CouldntSaveDataException [inherited]

Removes a tag from the node.

Parameters:
tag The tag to remove from the node.
Exceptions:
CouldntSaveDataException Thrown if the tag could not be removed from the node.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.setBorderColor ( final Color  color  )  [inherited]

Changes the border color of the node.

Parameters:
color The new border color of the node.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.setColor ( final Color  color  )  [inherited]

Changes the background color of the node.

Parameters:
color The new background color of the node.
void com.google.security.zynamics.binnavi.API.disassembly.CodeNode.setInstructionColor ( final Instruction  instruction,
final int  level,
final Color  color 
)

Changes the background color of an instruction in the code node.

Parameters:
instruction The instruction whose color is changed.
level Identifies the drawing level. Lower levels are drawn at a higher priority than higher levels. Levels below 1000 are reserved for BinNavi and can not be used.
color The color used to highlight the instruction. If this argument is null, highlighting is cleared.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.setSelected ( final boolean  selection  )  [inherited]

Selects or deselects the node.

Parameters:
selection True to select the node, false to deselect it.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.setX ( final double  newX  )  [inherited]

Changes the X position of the node.

Parameters:
newX The new X position of the node.
void com.google.security.zynamics.binnavi.API.disassembly.ViewNode.setY ( final double  newY  )  [inherited]

Changes the Y position of the node.

Parameters:
newY The new Y position of the node.
String com.google.security.zynamics.binnavi.API.disassembly.CodeNode.toString (  ) 

Returns a string representation of the code node.

Returns:
A string representation of the code node.

Reimplemented from com.google.security.zynamics.binnavi.API.disassembly.ViewNode.