Package ghidra.program.model.block.graph
Class CodeBlockVertex
- java.lang.Object
-
- ghidra.program.model.block.graph.CodeBlockVertex
-
- All Implemented Interfaces:
java.lang.Comparable<CodeBlockVertex>
public class CodeBlockVertex extends java.lang.Object implements java.lang.Comparable<CodeBlockVertex>
A class for representing a code block within a graph.
-
-
Constructor Summary
Constructors Constructor Description CodeBlockVertex(CodeBlock codeBlock)
Constructor.CodeBlockVertex(java.lang.String name)
A constructor that allows for the creation of dummy nodes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CodeBlockVertex o)
boolean
equals(java.lang.Object obj)
CodeBlock
getCodeBlock()
java.lang.String
getName()
int
hashCode()
boolean
isDummy()
Returns true if this vertex is not backed by a code block.java.lang.String
toString()
-
-
-
Constructor Detail
-
CodeBlockVertex
public CodeBlockVertex(CodeBlock codeBlock)
Constructor.- Parameters:
codeBlock
- the code block for this vertex
-
CodeBlockVertex
public CodeBlockVertex(java.lang.String name)
A constructor that allows for the creation of dummy nodes. This is useful in graphs where multiple entry or exit points need to be parented by a single vertex.- Parameters:
name
- the name of this vertex
-
-
Method Detail
-
getCodeBlock
public CodeBlock getCodeBlock()
-
getName
public java.lang.String getName()
-
isDummy
public boolean isDummy()
Returns true if this vertex is not backed by a code block.- Returns:
- true if this vertex is not backed by a code block.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(CodeBlockVertex o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<CodeBlockVertex>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-