FileDocCategorySizeDatePackage
InsnMultiDimArrayNew.javaAPI DocGlassfish v2 API4607Fri May 04 22:34:28 BST 2007com.sun.jdo.api.persistence.enhancer.classfile

InsnMultiDimArrayNew

public class InsnMultiDimArrayNew extends Insn
Special instruction form for the opc_multianewarray instruction

Fields Summary
private ConstClass
classOp
private int
nDimsOp
Constructors Summary
public InsnMultiDimArrayNew(ConstClass classOp, int nDimsOp)
Constructor for opc_multianewarray. classOp must be an array class nDimsOp must be > 0 and <= number of array dimensions for classOp

    this(classOp, nDimsOp, NO_OFFSET);
  
InsnMultiDimArrayNew(ConstClass classOp, int nDimsOp, int offset)

    super(opc_multianewarray, offset);

    this.classOp = classOp;
    this.nDimsOp = nDimsOp; 

    if (classOp == null || nDimsOp < 1)
	throw new InsnError ("attempt to create an opc_multianewarray" +//NOI18N
			     " with invalid operands");//NOI18N
  
Methods Summary
public java.lang.StringargTypes()
What are the types of the stack operands ?

    StringBuffer buf = new StringBuffer();
    for (int i=0; i<nDimsOp; i++) {
        buf.append("I");//NOI18N
    }
    return buf.toString();
  
public ConstClassarrayClass()
Return the array class being created

    return classOp;
  
public booleanbranches()

    return false;
  
public booleanisSimpleLoad()

    return false;
  
public intnDims()
Return the number of dimensions of the array class being created

    return nDimsOp;
  
public intnStackArgs()

    return nDimsOp;
  
public intnStackResults()

    return 1;
  
voidprint(java.io.PrintStream out, int indent)

    ClassPrint.spaces(out, indent);
    out.println(offset() + "  opc_multianewarray  pool(" +//NOI18N
		classOp.getIndex() + ")," + nDimsOp);//NOI18N
  
static com.sun.jdo.api.persistence.enhancer.classfile.InsnMultiDimArrayNewread(InsnReadEnv insnEnv, int myPC)

    ConstClass classOp = (ConstClass)
      insnEnv.pool().constantAt(insnEnv.getUShort());
    int nDims = insnEnv.getUByte();
    return new InsnMultiDimArrayNew(classOp, nDims, myPC);
  
public java.lang.StringresultTypes()
What are the types of the stack results?

      return "A";//NOI18N
  
public voidsetArrayClass(ConstClass classOp)
Sets the array class being created

    this.classOp = classOp;
  
intsize()

    return 4;
  
intstore(byte[] buf, int index)

    buf[index++] = (byte) opcode();
    index = storeShort(buf, index, (short) classOp.getIndex());
    buf[index++] = (byte) nDimsOp;
    return index;