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 intcompareTo(CodeBlockVertex o)booleanequals(java.lang.Object obj)CodeBlockgetCodeBlock()java.lang.StringgetName()inthashCode()booleanisDummy()Returns true if this vertex is not backed by a code block.java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(CodeBlockVertex o)
- Specified by:
compareToin interfacejava.lang.Comparable<CodeBlockVertex>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-