org.apache.bcel.generic

Class IfInstruction

Implemented Interfaces:
Cloneable, InstructionTargeter, Serializable, StackConsumer
Known Direct Subclasses:
IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE

public abstract class IfInstruction
extends BranchInstruction
implements StackConsumer

Super class for the IFxxx family of instructions.
Version:
$Id: IfInstruction.java 386056 2006-03-15 11:31:56Z tcurdt $
Author:
M. Dahm

Field Summary

Fields inherited from class org.apache.bcel.generic.BranchInstruction

index, position, target

Fields inherited from class org.apache.bcel.generic.Instruction

cmp, length, opcode

Constructor Summary

IfInstruction()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
IfInstruction(short opcode, InstructionHandle target)

Method Summary

abstract IfInstruction
negate()

Methods inherited from class org.apache.bcel.generic.BranchInstruction

containsTarget, dispose, dump, getIndex, getTarget, getTargetOffset, getTargetOffset, initFromFile, notifyTarget, setTarget, toString, updatePosition, updateTarget

Methods inherited from class org.apache.bcel.generic.Instruction

accept, className, consumeStack, copy, dispose, dump, equals, getComparator, getLength, getName, getOpcode, initFromFile, produceStack, readInstruction, setComparator, setOpcode, toString, toString, toString

Constructor Details

IfInstruction

(package private)  IfInstruction()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

IfInstruction

protected IfInstruction(short opcode,
                        InstructionHandle target)
Parameters:
opcode - opcode of instruction
target - Target instruction to branch to

Method Details

negate

public abstract IfInstruction negate()
Returns:
negation of instruction, e.g. IFEQ.negate() == IFNE