Package ghidra.program.model.block
Class CodeBlockReferenceImpl
- java.lang.Object
-
- ghidra.program.model.block.CodeBlockReferenceImpl
-
- All Implemented Interfaces:
CodeBlockReference
public class CodeBlockReferenceImpl extends java.lang.Object implements CodeBlockReference
CodeBlockReferenceImpl implements a CodeBlockReference.A
CodeBlockReferencerepresents the flow from one source block to a destination block, including information about how flow occurs between the two blocks (JUMP, CALL, etc..).The
referenceis the address in the destination block that is actually flowed to by some instruction in the source block.The
referentis the address of the instruction in the source block that flows to the destination block.- See Also:
CodeBlockReference
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddressgetDestinationAddress()Returns the Destination Block address.CodeBlockgetDestinationBlock()Returns the Destination CodeBlock.FlowTypegetFlowType()Returns the type of flow from the Source to the Destination CodeBlock.AddressgetReference()Returns the address in the Destination block that is referenced by the Source block.AddressgetReferent()Returns the address of the instruction in the Source Block that refers to the Destination block.AddressgetSourceAddress()Returns the Source Block address.CodeBlockgetSourceBlock()Returns the Source CodeBlock.java.lang.StringtoString()
-
-
-
Constructor Detail
-
CodeBlockReferenceImpl
public CodeBlockReferenceImpl(CodeBlock source, CodeBlock destination, FlowType flowType, Address reference, Address referent)
Constructor for a CodeBlockReferenceImpl- Parameters:
source- source block for this flowdestination- destination block for this flowflowType- how we flowreference- reference address in destination blockreferent- address of instruction in source block that flows to destination block.
-
-
Method Detail
-
getSourceBlock
public CodeBlock getSourceBlock()
Description copied from interface:CodeBlockReferenceReturns the Source CodeBlock.- Specified by:
getSourceBlockin interfaceCodeBlockReference- Returns:
- the Source CodeBlock
- See Also:
CodeBlockReference.getSourceBlock()
-
getDestinationBlock
public CodeBlock getDestinationBlock()
Description copied from interface:CodeBlockReferenceReturns the Destination CodeBlock.- Specified by:
getDestinationBlockin interfaceCodeBlockReference- Returns:
- the Destination CodeBlock
- See Also:
CodeBlockReference.getDestinationBlock()
-
getFlowType
public FlowType getFlowType()
Description copied from interface:CodeBlockReferenceReturns the type of flow from the Source to the Destination CodeBlock.- Specified by:
getFlowTypein interfaceCodeBlockReference- Returns:
- the type of flow
- See Also:
CodeBlockReference.getFlowType()
-
getReference
public Address getReference()
Description copied from interface:CodeBlockReferenceReturns the address in the Destination block that is referenced by the Source block.- Specified by:
getReferencein interfaceCodeBlockReference- Returns:
- the address in the Destination block that is referenced by the Source block
- See Also:
CodeBlockReference.getReference()
-
getReferent
public Address getReferent()
Description copied from interface:CodeBlockReferenceReturns the address of the instruction in the Source Block that refers to the Destination block.- Specified by:
getReferentin interfaceCodeBlockReference- Returns:
- the address of the instruction in the Source Block that refers to the Destination block
- See Also:
CodeBlockReference.getReferent()
-
getSourceAddress
public Address getSourceAddress()
Description copied from interface:CodeBlockReferenceReturns the Source Block address. The source address should only occur in one block.- Specified by:
getSourceAddressin interfaceCodeBlockReference- Returns:
- the Source Block address
- See Also:
CodeBlockReference.getSourceAddress()
-
getDestinationAddress
public Address getDestinationAddress()
Description copied from interface:CodeBlockReferenceReturns the Destination Block address. The destination address should only occur in one block.- Specified by:
getDestinationAddressin interfaceCodeBlockReference- Returns:
- the Destination Block address
- See Also:
CodeBlockReference.getDestinationAddress()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-