org.apache.xalan.xsltc.compiler.util
Class MarkerInstruction

java.lang.Object
  extended by Instruction
      extended by org.apache.xalan.xsltc.compiler.util.MarkerInstruction
Direct Known Subclasses:
OutlineableChunkEnd, OutlineableChunkStart

abstract class MarkerInstruction
extends Instruction

A special abstract dummy subclass of org.apache.bcel.generic.Instruction used to mark locations of interest in an org.apache.bcel.generic.InstructionList. It and its subclasses are only used as placeholders, and do not contribute to the actual byte code instruction stream.


Constructor Summary
MarkerInstruction()
          Zero-argument constructor.
 
Method Summary
 void accept(Visitor v)
          org.apache.bcel.generic.Visitors will know nothing about this kind of org.apche.bcel.generic.Instruction, so this method does nothing.
 int consumeStack(ConstantPoolGen cpg)
          The number of JVM stack entries consumed by the instruction.
 Instruction copy()
          Produce a copy of the instruction.
 void dump(java.io.DataOutputStream out)
          Dump instruction as byte code to stream out.
 int produceStack(ConstantPoolGen cpg)
          The number of JVM stack entries produced by the instruction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkerInstruction

public MarkerInstruction()
Zero-argument constructor. Sets the opcode to an invalid value and sets the length to zero, as it will not be written as part of the generated byte code.

Method Detail

accept

public void accept(Visitor v)
org.apache.bcel.generic.Visitors will know nothing about this kind of org.apche.bcel.generic.Instruction, so this method does nothing.


consumeStack

public final int consumeStack(ConstantPoolGen cpg)
The number of JVM stack entries consumed by the instruction. This instruction is just a place holder, so it does not consume any stack entries.

Parameters:
cpg - The org.apache.bcel.generic.ConstantPoolGen for the current org.apache.bcel.generic.ClassGen
Returns:
0 always

produceStack

public final int produceStack(ConstantPoolGen cpg)
The number of JVM stack entries produced by the instruction. This instruction is just a place holder, so it does not produce any stack entries.

Parameters:
cpg - The org.apache.bcel.generic.ConstantPoolGen for the current org.apache.bcel.generic.ClassGen
Returns:
0 always

copy

public Instruction copy()
Produce a copy of the instruction. By default a MarkerInstruction has no parameters, so the base implementation of copy() returns the instruction itself.

Returns:
The instruction itself.

dump

public final void dump(java.io.DataOutputStream out)
                throws java.io.IOException
Dump instruction as byte code to stream out. A MarkerInstruction has no effect on the generated byte code so it is never emitted to the output stream.

Parameters:
out - Output stream
Throws:
java.io.IOException