/** * Pushes a new array on the stack. * * Operand stack: * ... -> ..., array * * @param type the array element type (or class name in case of objects). * @param size the size of the array to be created. */ public InstructionSequenceBuilder pushNewArray(String type, int size) { // Create new array. pushInt(size); return ClassUtil.isInternalPrimitiveType(type) ? newarray(InstructionUtil.arrayTypeFromInternalType(type.charAt(0))) : anewarray(type, null); }
stack.push(valueFactory.createArrayReferenceValue(String.valueOf(InstructionUtil.internalTypeFromArrayType((byte)simpleInstruction.constant)), null, arrayLength));
stack.push(valueFactory.createArrayReferenceValue(String.valueOf(InstructionUtil.internalTypeFromArrayType((byte)simpleInstruction.constant)), null, arrayLength));
/** * Pushes a new array on the stack. * * Operand stack: * ... -> ..., array * * @param elementTypeOrClassName the array element type (or class name in case of objects). * @param size the size of the array to be created. */ public CompactCodeAttributeComposer pushNewArray(String elementTypeOrClassName, int size) { // Create new array. pushInt(size); return ClassUtil.isInternalPrimitiveType(elementTypeOrClassName) ? newarray(InstructionUtil.arrayTypeFromInternalType(elementTypeOrClassName.charAt(0))) : anewarray(elementTypeOrClassName, null); }
stack.push(valueFactory.createArrayReferenceValue(String.valueOf(InstructionUtil.internalTypeFromArrayType((byte)simpleInstruction.constant)), null, arrayLength));
/** * Pushes a new array on the stack. * * Operand stack: * ... -> ..., array * * @param elementTypeOrClassName the array element type (or class name in case of objects). * @param size the size of the array to be created. */ public CompactCodeAttributeComposer pushNewArray(String elementTypeOrClassName, int size) { // Create new array. pushInt(size); return ClassUtil.isInternalPrimitiveType(elementTypeOrClassName) ? newarray(InstructionUtil.arrayTypeFromInternalType(elementTypeOrClassName.charAt(0))) : anewarray(elementTypeOrClassName, null); }
stack.push(valueFactory.createArrayReferenceValue(String.valueOf(InstructionUtil.internalTypeFromArrayType((byte)simpleInstruction.constant)), null, arrayLength));
/** * Pushes a new array on the stack. * * Operand stack: * ... -> ..., array * * @param type the array element type (or class name in case of objects). * @param size the size of the array to be created. */ public InstructionSequenceBuilder pushNewArray(String type, int size) { // Create new array. pushInt(size); return ClassUtil.isInternalPrimitiveType(type) ? newarray(InstructionUtil.arrayTypeFromInternalType(type.charAt(0))) : anewarray(type, null); }
/** * Pushes a new array on the stack. * * Operand stack: * ... -> ..., array * * @param elementTypeOrClassName the array element type (or class name in case of objects). * @param size the size of the array to be created. */ public CompactCodeAttributeComposer pushNewArray(String elementTypeOrClassName, int size) { // Create new array. pushInt(size); return ClassUtil.isInternalPrimitiveType(elementTypeOrClassName) ? newarray(InstructionUtil.arrayTypeFromInternalType(elementTypeOrClassName.charAt(0))) : anewarray(elementTypeOrClassName, null); }
/** * Pushes a new array on the stack. * * Operand stack: * ... -> ..., array * * @param type the array element type (or class name in case of objects). * @param size the size of the array to be created. */ public InstructionSequenceBuilder pushNewArray(String type, int size) { // Create new array. pushInt(size); return ClassUtil.isInternalPrimitiveType(type) ? newarray(InstructionUtil.arrayTypeFromInternalType(type.charAt(0))) : anewarray(type, null); }
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant) { char primitiveType = primitiveArrayConstant.getPrimitiveType(); int arrayLength = primitiveArrayConstant.getLength(); // Start composing a new array initialization sequence. builder = new InstructionSequenceBuilder((ProgramClass) clazz); // Push the primitive array length. builder.pushInt(primitiveArrayConstant.getLength()); // Create the primitive array. builder.newarray(InstructionUtil.arrayTypeFromInternalType(primitiveType)); // Fill out the primitive array elements. primitiveArrayConstant.primitiveArrayElementsAccept(clazz, this); }
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant) { char primitiveType = primitiveArrayConstant.getPrimitiveType(); int arrayLength = primitiveArrayConstant.getLength(); // Start composing a new array initialization sequence. builder = new InstructionSequenceBuilder((ProgramClass) clazz); // Push the primitive array length. builder.pushInt(primitiveArrayConstant.getLength()); // Create the primitive array. builder.newarray(InstructionUtil.arrayTypeFromInternalType(primitiveType)); // Fill out the primitive array elements. primitiveArrayConstant.primitiveArrayElementsAccept(clazz, this); }
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant) { char primitiveType = primitiveArrayConstant.getPrimitiveType(); int arrayLength = primitiveArrayConstant.getLength(); // Start composing a new array initialization sequence. builder = new InstructionSequenceBuilder((ProgramClass) clazz); // Push the primitive array length. builder.pushInt(primitiveArrayConstant.getLength()); // Create the primitive array. builder.newarray(InstructionUtil.arrayTypeFromInternalType(primitiveType)); // Fill out the primitive array elements. primitiveArrayConstant.primitiveArrayElementsAccept(clazz, this); }