dovs.instructions
Class Jump

java.lang.Object
  extended by dovs.instructions.Instruction
      extended by dovs.instructions.Jump
Direct Known Subclasses:
ConditionalJump, Igoto

public abstract class Jump
extends Instruction

Common superclass for all conditional and unconditional jump instructions.


Field Summary
protected  Label target
           
 
Constructor Summary
Jump(Label target)
           
 
Method Summary
 boolean canJump()
          Can this instruction transfer control to a label?
 Label getTarget()
          What is the target of any jump that this instruction performs?
 
Methods inherited from class dovs.instructions.Instruction
canFallThrough, getArg, getID, getID, localAccess, stackChange, toAsm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected Label target
Constructor Detail

Jump

public Jump(Label target)
Method Detail

canJump

public boolean canJump()
Description copied from class: Instruction
Can this instruction transfer control to a label? If so, the Instruction.getTarget() method returns the label.

Overrides:
canJump in class Instruction
Returns:
whether or not the instruction can jump

getTarget

public Label getTarget()
Description copied from class: Instruction
What is the target of any jump that this instruction performs? This function is only legal to call if Instruction.canJump() returns true.

Overrides:
getTarget in class Instruction
Returns:
the target label