/** * Makes an initializer creating a new array. * * @param type the type of the array. * @param size the size of the array. * @throws NotFoundException if the type of the array components * is not found. */ public static Initializer byNewArray(CtClass type, int size) throws NotFoundException { return new ArrayInitializer(type.getComponentType(), size); }
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException { code.addAload(0); addNewarray(code); code.addPutfield(Bytecode.THIS, name, Descriptor.of(type)); return 2; // stack size }
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException { code.addAload(0); addNewarray(code); code.addPutfield(Bytecode.THIS, name, Descriptor.of(type)); return 2; // stack size }
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException { addNewarray(code); code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type)); return 1; // stack size } }
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException { code.addAload(0); addNewarray(code); code.addPutfield(Bytecode.THIS, name, Descriptor.of(type)); return 2; // stack size }
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException { addNewarray(code); code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type)); return 1; // stack size } }
/** * Makes an initializer creating a new array. * * @param type the type of the array. * @param size the size of the array. * @throws NotFoundException if the type of the array components * is not found. */ public static Initializer byNewArray(CtClass type, int size) throws NotFoundException { return new ArrayInitializer(type.getComponentType(), size); }
/** * Makes an initializer creating a new array. * * @param type the type of the array. * @param size the size of the array. * @throws NotFoundException if the type of the array components * is not found. */ public static Initializer byNewArray(CtClass type, int size) throws NotFoundException { return new ArrayInitializer(type.getComponentType(), size); }
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException { addNewarray(code); code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type)); return 1; // stack size } }
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException { code.addAload(0); addNewarray(code); code.addPutfield(Bytecode.THIS, name, Descriptor.of(type)); return 2; // stack size }
/** * Makes an initializer creating a new array. * * @param type the type of the array. * @param size the size of the array. * @throws NotFoundException if the type of the array components * is not found. */ public static Initializer byNewArray(CtClass type, int size) throws NotFoundException { return new ArrayInitializer(type.getComponentType(), size); }
/** * Makes an initializer creating a new array. * * @param type the type of the array. * @param size the size of the array. * @throws NotFoundException if the type of the array components * is not found. */ public static Initializer byNewArray(CtClass type, int size) throws NotFoundException { return new ArrayInitializer(type.getComponentType(), size); }
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException { addNewarray(code); code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type)); return 1; // stack size } }
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException { addNewarray(code); code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type)); return 1; // stack size } }
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException { code.addAload(0); addNewarray(code); code.addPutfield(Bytecode.THIS, name, Descriptor.of(type)); return 2; // stack size }
/** * Makes an initializer creating a new array. * * @param type the type of the array. * @param size the size of the array. * @throws NotFoundException if the type of the array components * is not found. */ public static Initializer byNewArray(CtClass type, int size) throws NotFoundException { return new ArrayInitializer(type.getComponentType(), size); }
@Override int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException { code.addAload(0); addNewarray(code); code.addPutfield(Bytecode.THIS, name, Descriptor.of(type)); return 2; // stack size }
@Override int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException { addNewarray(code); code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type)); return 1; // stack size } }
int compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) throws CannotCompileException { addNewarray(code); code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type)); return 1; // stack size } }
int compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) throws CannotCompileException { code.addAload(0); addNewarray(code); code.addPutfield(Bytecode.THIS, name, Descriptor.of(type)); return 2; // stack size }