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
CodeBlockReference
represents the flow from one source block to a destination block, including information about how flow occurs between the two blocks (JUMP, CALL, etc..).The
reference
is the address in the destination block that is actually flowed to by some instruction in the source block.The
referent
is 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 Address
getDestinationAddress()
Returns the Destination Block address.CodeBlock
getDestinationBlock()
Returns the Destination CodeBlock.FlowType
getFlowType()
Returns the type of flow from the Source to the Destination CodeBlock.Address
getReference()
Returns the address in the Destination block that is referenced by the Source block.Address
getReferent()
Returns the address of the instruction in the Source Block that refers to the Destination block.Address
getSourceAddress()
Returns the Source Block address.CodeBlock
getSourceBlock()
Returns the Source CodeBlock.java.lang.String
toString()
-
-
-
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:CodeBlockReference
Returns the Source CodeBlock.- Specified by:
getSourceBlock
in interfaceCodeBlockReference
- Returns:
- the Source CodeBlock
- See Also:
CodeBlockReference.getSourceBlock()
-
getDestinationBlock
public CodeBlock getDestinationBlock()
Description copied from interface:CodeBlockReference
Returns the Destination CodeBlock.- Specified by:
getDestinationBlock
in interfaceCodeBlockReference
- Returns:
- the Destination CodeBlock
- See Also:
CodeBlockReference.getDestinationBlock()
-
getFlowType
public FlowType getFlowType()
Description copied from interface:CodeBlockReference
Returns the type of flow from the Source to the Destination CodeBlock.- Specified by:
getFlowType
in interfaceCodeBlockReference
- Returns:
- the type of flow
- See Also:
CodeBlockReference.getFlowType()
-
getReference
public Address getReference()
Description copied from interface:CodeBlockReference
Returns the address in the Destination block that is referenced by the Source block.- Specified by:
getReference
in 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:CodeBlockReference
Returns the address of the instruction in the Source Block that refers to the Destination block.- Specified by:
getReferent
in 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:CodeBlockReference
Returns the Source Block address. The source address should only occur in one block.- Specified by:
getSourceAddress
in interfaceCodeBlockReference
- Returns:
- the Source Block address
- See Also:
CodeBlockReference.getSourceAddress()
-
getDestinationAddress
public Address getDestinationAddress()
Description copied from interface:CodeBlockReference
Returns the Destination Block address. The destination address should only occur in one block.- Specified by:
getDestinationAddress
in interfaceCodeBlockReference
- Returns:
- the Destination Block address
- See Also:
CodeBlockReference.getDestinationAddress()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-