TechTrader Bytecode Toolkit

com.techtrader.modules.tools.bytecode
Class MultiANewArrayInstruction

java.lang.Object
  |
  +--com.techtrader.modules.tools.bytecode.Instruction
        |
        +--com.techtrader.modules.tools.bytecode.ClassInstruction
              |
              +--com.techtrader.modules.tools.bytecode.MultiANewArrayInstruction

public class MultiANewArrayInstruction
extends ClassInstruction

Represents the MULTIANEWARRAY opcode instruction, which creates a new multi-dimensional array.

Author:
Abe White

Fields inherited from class com.techtrader.modules.tools.bytecode.Instruction
_byteIndex, _opcode, _opcodeTypes, _owner
 
Constructor Summary
protected MultiANewArrayInstruction(Code owner)
           
 
Method Summary
 void acceptVisit(BCVisitor visit)
          Accept a visit from a BCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this object.
protected  void copy(Instruction orig)
           
 boolean equals(Object other)
          Two MULTIANEWARRAY instructions are equal if they have the same type and dimensions, or if the type and dimensions of either is unset.
 int getDimensions()
          Get the dimensions of the array.
 int getLength()
          Return the length in bytes of this opcode, including all arguments.
 int getStackChange()
          Return the number of stack positions this instruction pushes or pops during its execution.
protected  void readData(DataInput in)
          Read the arguments for this opcode from the given stream.
 MultiANewArrayInstruction setDimensions(int dims)
          Set the dimensions of the array.
protected  void writeData(DataOutput out)
          Write the arguments for this opcode to the given stream.
 
Methods inherited from class com.techtrader.modules.tools.bytecode.ClassInstruction
getClassIndex, getClassName, getClassType, setClassIndex, setClassName, setClassType
 
Methods inherited from class com.techtrader.modules.tools.bytecode.Instruction
getByteIndex, getName, getOpCode, getOwner, invalidate, setByteIndex, setOpCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiANewArrayInstruction

protected MultiANewArrayInstruction(Code owner)
Method Detail

setDimensions

public MultiANewArrayInstruction setDimensions(int dims)
Set the dimensions of the array.
Returns:
this Instruction, for method chaining

getDimensions

public int getDimensions()
Get the dimensions of the array.

equals

public boolean equals(Object other)
Two MULTIANEWARRAY instructions are equal if they have the same type and dimensions, or if the type and dimensions of either is unset.
Overrides:
equals in class ClassInstruction

getLength

public int getLength()
Description copied from class: Instruction
Return the length in bytes of this opcode, including all arguments. This method should be overridden by opcodes that take arguments.
Overrides:
getLength in class ClassInstruction

getStackChange

public int getStackChange()
Description copied from class: Instruction
Return the number of stack positions this instruction pushes or pops during its execution.
Overrides:
getStackChange in class ClassInstruction
Tags copied from class: Instruction
Returns:
0 if the stack is not affected by this instruction, a positive number if it pushes onto the stack, and a negative number if it pops from the stack

copy

protected void copy(Instruction orig)
Overrides:
copy in class ClassInstruction

readData

protected void readData(DataInput in)
                 throws IOException
Description copied from class: Instruction
Read the arguments for this opcode from the given stream. This method should be overridden by opcodes that take arguments.
Overrides:
readData in class ClassInstruction

writeData

protected void writeData(DataOutput out)
                  throws IOException
Description copied from class: Instruction
Write the arguments for this opcode to the given stream. This method should be overridden by opcodes that take arguments.
Overrides:
writeData in class ClassInstruction

acceptVisit

public void acceptVisit(BCVisitor visit)
Description copied from interface: VisitAcceptor
Accept a visit from a BCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this object.
Overrides:
acceptVisit in class ClassInstruction

TechTrader Bytecode Toolkit