Class ConcreteCall
- java.lang.Object
-
- ru.ispras.microtesk.test.template.ConcreteCall
-
public final class ConcreteCall extends java.lang.Object
TheConcreteCall
class describes an instruction call with fixed arguments which can be simulated. It also can hold objects are used by processing logic to do some housekeeping job.
-
-
Constructor Summary
Constructors Constructor Description ConcreteCall(InstructionCall executable)
ConcreteCall(AbstractCall abstractCall)
ConcreteCall(AbstractCall abstractCall, InstructionCall executable, java.util.List<LabelReference> labelRefs, java.util.List<LocationAccessor> addressRefs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
execute(ProcessingElement processingElement)
Executes the instruction call on the specified processing element.java.math.BigInteger
getAddress()
int
getByteSize()
DataSection
getData()
java.util.List<Directive>
getDirectives()
InstructionCall
getExecutable()
int
getExecutionCount()
java.lang.String
getImage()
java.util.List<LabelReference>
getLabelReferences()
java.util.List<Label>
getLabels()
java.util.List<Output>
getOutputs()
java.lang.String
getText()
boolean
isExecutable()
boolean
isInstruction()
Checks whether the instruction call corresponds to a printable instruction (executable instruction or pseudo instruction).static ConcreteCall
newComment(java.lang.String comment)
static ConcreteCall
newLine()
static ConcreteCall
newText(java.lang.String text)
void
resetExecutionCount()
void
setAddress(java.math.BigInteger address)
-
-
-
Constructor Detail
-
ConcreteCall
public ConcreteCall(AbstractCall abstractCall, InstructionCall executable, java.util.List<LabelReference> labelRefs, java.util.List<LocationAccessor> addressRefs)
-
ConcreteCall
public ConcreteCall(AbstractCall abstractCall)
-
ConcreteCall
public ConcreteCall(InstructionCall executable)
-
-
Method Detail
-
newText
public static ConcreteCall newText(java.lang.String text)
-
newLine
public static ConcreteCall newLine()
-
newComment
public static ConcreteCall newComment(java.lang.String comment)
-
isExecutable
public boolean isExecutable()
-
getExecutable
public InstructionCall getExecutable()
-
isInstruction
public boolean isInstruction()
Checks whether the instruction call corresponds to a printable instruction (executable instruction or pseudo instruction). This method is used to calculate statistics on instruction number.- Returns:
true
if the call corresponds to a printable instruction orfalse
if it is used to housekeeping purposes.
-
execute
public java.lang.String execute(ProcessingElement processingElement)
Executes the instruction call on the specified processing element.- Parameters:
processingElement
- Processing element instance to be used for execution.- Returns:
- exception name if was interrupted.
-
getExecutionCount
public int getExecutionCount()
-
resetExecutionCount
public void resetExecutionCount()
-
getText
public java.lang.String getText()
-
getImage
public java.lang.String getImage()
-
getDirectives
public java.util.List<Directive> getDirectives()
-
getLabels
public java.util.List<Label> getLabels()
-
getLabelReferences
public java.util.List<LabelReference> getLabelReferences()
-
getOutputs
public java.util.List<Output> getOutputs()
-
getByteSize
public int getByteSize()
-
getAddress
public java.math.BigInteger getAddress()
-
setAddress
public void setAddress(java.math.BigInteger address)
-
getData
public DataSection getData()
-
-