Top Description Fields Constructors Methods
org.apache.bcel.generic

public Class MULTIANEWARRAY

extends CPInstruction
implements LoadClass, AllocationInstruction, ExceptionThrower
Class Inheritance
All Implemented Interfaces
org.apache.bcel.generic.ExceptionThrower, org.apache.bcel.generic.AllocationInstruction, org.apache.bcel.generic.LoadClass
Imports
java.io.DataOutputStream, .IOException, org.apache.bcel.ExceptionConst, org.apache.bcel.classfile.ConstantPool, org.apache.bcel.util.ByteSequence

MULTIANEWARRAY - Create new mutidimensional array of references
Stack: ..., count1, [count2, ...] -> ..., arrayref

Field Summary

Modifier and TypeField and Description
private short
Inherited from org.apache.bcel.generic.CPInstruction:
index

Constructor Summary

AccessConstructor and Description
pack-priv
MULTIANEWARRAY()

Empty constructor needed for Instruction.readInstruction.

public
MULTIANEWARRAY(final int index, final short dimensions)

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract org.apache.bcel.generic.Instruction.accept.

Call corresponding visitor method(s).
public int

Returns:

Number of words consumed from stack by this instruction
consumeStack
(final ConstantPoolGen cpg)

Overrides org.apache.bcel.generic.Instruction.consumeStack.

Also works for instructions whose stack effect depends on the constant pool entry they reference.
public void
dump(final DataOutputStream
Output stream
out
)

Overrides org.apache.bcel.generic.CPInstruction.dump.

Dump instruction as byte code to stream out.
public final short

Returns:

number of dimensions to be created
getDimensions
()

public Class<?>[]
public ObjectType
getLoadClassType(final ConstantPoolGen
A ConstantPoolGen
cpg
)

Implements org.apache.bcel.generic.LoadClass.getLoadClassType.

Returns the ObjectType of the referenced class or interface that may be loaded and resolved.
protected void
initFromFile(final ByteSequence
input stream
bytes
,
final boolean
wide prefix?
wide
)

Overrides org.apache.bcel.generic.CPInstruction.initFromFile.

Read needed data (i.e., no.
public String

Returns:

mnemonic for instruction
toString
(final boolean
long/short format switch
verbose
)

Overrides org.apache.bcel.generic.CPInstruction.toString.

Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< constant pool index>">"
public String

Returns:

mnemonic for instruction with symbolic references resolved
toString
(final ConstantPool cp)

Overrides org.apache.bcel.generic.CPInstruction.toString.

Inherited from org.apache.bcel.generic.CPInstruction:
getIndexgetTypesetIndex

Field Detail

dimensionsback to summary
private short dimensions

Constructor Detail

MULTIANEWARRAYback to summary
pack-priv MULTIANEWARRAY()

Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.

MULTIANEWARRAYback to summary
public MULTIANEWARRAY(final int index, final short dimensions)

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract org.apache.bcel.generic.Instruction.accept.

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

Visitor object

Annotations
@Override
consumeStackback to summary
public int consumeStack(final ConstantPoolGen cpg)

Overrides org.apache.bcel.generic.Instruction.consumeStack.

Also works for instructions whose stack effect depends on the constant pool entry they reference.

Returns:int

Number of words consumed from stack by this instruction

Annotations
@Override
dumpback to summary
public void dump(final DataOutputStream out) throws IOException

Overrides org.apache.bcel.generic.CPInstruction.dump.

Dump instruction as byte code to stream out.

Parameters
out:DataOutputStream

Output stream

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.bcel.generic.Instruction.dump.

Thrown when an I/O exception of some sort has occurred.

getDimensionsback to summary
public final short getDimensions()
Returns:short

number of dimensions to be created

getExceptionsback to summary
public Class<?>[] getExceptions()

Implements org.apache.bcel.generic.ExceptionThrower.getExceptions.

Annotations
@Override
getLoadClassTypeback to summary
public ObjectType getLoadClassType(final ConstantPoolGen cpg)

Implements org.apache.bcel.generic.LoadClass.getLoadClassType.

Doc from org.apache.bcel.generic.LoadClass.getLoadClassType.

Returns the ObjectType of the referenced class or interface that may be loaded and resolved.

Parameters
cpg:ConstantPoolGen

A ConstantPoolGen

Returns:ObjectType

object type that may be loaded or null if a primitive is referenced

Annotations
@Override
initFromFileback to summary
protected void initFromFile(final ByteSequence bytes, final boolean wide) throws IOException

Overrides org.apache.bcel.generic.CPInstruction.initFromFile.

Read needed data (i.e., no. dimension) from file.

Parameters
bytes:ByteSequence

Doc from org.apache.bcel.generic.CPInstruction.initFromFile.

input stream

wide:boolean

Doc from org.apache.bcel.generic.CPInstruction.initFromFile.

wide prefix?

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.bcel.generic.Instruction.initFromFile.

may be thrown if the implementation needs to read data from the file

toStringback to summary
public String toString(final boolean verbose)

Overrides org.apache.bcel.generic.CPInstruction.toString.

Doc from org.apache.bcel.generic.CPInstruction.toString.

Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< constant pool index>">"

Parameters
verbose:boolean

long/short format switch

Returns:String

mnemonic for instruction

Annotations
@Override
toStringback to summary
public String toString(final ConstantPool cp)

Overrides org.apache.bcel.generic.CPInstruction.toString.

Returns:String

mnemonic for instruction with symbolic references resolved

Annotations
@Override