public final class LabelReference
extends java.lang.Object
LabelReference
class describes a reference to a label. This means a label specified
as an argument of a control-transfer instruction. The important point is that a reference
is not linked to a specific label, it just provides information used for label lookup during
simulation. There may be several labels with the same name located in different blocks.
Which one will be chosen for control transfer will be chosen depending on the context (see
LabelManager
).Modifier | Constructor and Description |
---|---|
protected |
LabelReference(LabelReference other) |
|
LabelReference(LabelValue lazyLabel) |
|
LabelReference(LabelValue lazyLabel,
LocationAccessor patcher) |
Modifier and Type | Method and Description |
---|---|
static java.util.List<LabelReference> |
copyAll(java.util.List<LabelReference> labelRefs) |
java.math.BigInteger |
getArgumentValue()
Returns the value assigned (instead of a real address or offset) to the primitive
(OP or MODE) argument the label reference is associated with.
|
java.lang.String |
getName()
Returns the unique name of the target or referenced label if the target is not assigned.
|
LocationAccessor |
getPatcher() |
Label |
getReference()
Return a
Label object that describes a reference to a label with a specific name made
from a specific block. |
java.lang.String |
getReferenceSuffix() |
LabelManager.Target |
getTarget() |
void |
resetTarget() |
void |
setReference(Label label) |
void |
setTarget(LabelManager.Target target) |
java.lang.String |
toString() |
public LabelReference(LabelValue lazyLabel)
public LabelReference(LabelValue lazyLabel, LocationAccessor patcher)
protected LabelReference(LabelReference other)
public static java.util.List<LabelReference> copyAll(java.util.List<LabelReference> labelRefs)
public Label getReference()
Label
object that describes a reference to a label with a specific name made
from a specific block. There is no correspondence between the returned label and the actual
label that will be chosen for control transfer. It just provides context that helps choose the
most suitable label.public void setReference(Label label)
public java.lang.String getReferenceSuffix()
public java.math.BigInteger getArgumentValue()
public LabelManager.Target getTarget()
public java.lang.String getName()
public void setTarget(LabelManager.Target target)
public void resetTarget()
public LocationAccessor getPatcher()
public java.lang.String toString()
toString
in class java.lang.Object