org.apache.bcel.generic

Class NEWARRAY

public class NEWARRAY extends Instruction implements AllocationInstruction, ExceptionThrower, StackProducer

NEWARRAY - Create new array of basic type (int, short, ...)
Stack: ..., count -> ..., arrayref
type must be one of T_INT, T_SHORT, ...
Constructor Summary
NEWARRAY(byte type)
NEWARRAY(BasicType type)
Method Summary
voidaccept(Visitor v)
Call corresponding visitor method(s).
voiddump(DataOutputStream out)
Dump instruction as byte code to stream out.
Class[]getExceptions()
TypegetType()
bytegetTypecode()
protected voidinitFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.
StringtoString(boolean verbose)

Constructor Detail

NEWARRAY

public NEWARRAY(byte type)

NEWARRAY

public NEWARRAY(BasicType type)

Method Detail

accept

public void accept(Visitor v)
Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.

Parameters: v Visitor object

dump

public void dump(DataOutputStream out)
Dump instruction as byte code to stream out.

Parameters: out Output stream

getExceptions

public Class[] getExceptions()

getType

public final Type getType()

Returns: type of constructed array

getTypecode

public final byte getTypecode()

Returns: numeric code for basic element type

initFromFile

protected void initFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.

toString

public String toString(boolean verbose)

Returns: mnemonic for instruction