Package alt.jiapi.file.ConstantPool

Examples of alt.jiapi.file.ConstantPool.ClassInfo


     *
     * @param type type of the cast
     * @return an InstructionList
     */
    public Instruction cast(String type) {
        ClassInfo ci = cp.addClassInfo(type);
        short index = ci.getEntryIndex();

        byte[] bytes = new byte[3];
        bytes[0] = Opcodes.CHECKCAST;
        bytes[1] = (byte) (index >> 8);
        bytes[2] = (byte) (index & 255);
View Full Code Here


        if (SignatureUtil.isPrimitive(type)) {
            throw new RuntimeException("NOT implemented: new array for primitive types");
        }
        else {
            ClassInfo ci = cp.addClassInfo("java.lang.Object");
            short idx = ci.getEntryIndex();

            il.add(new CPInstruction(new byte[] {Opcodes.ANEWARRAY,
                                                 (byte)(idx >> 8),
                                                 (byte)(idx& 0xff)},
                                     cp));
View Full Code Here

TOP

Related Classes of alt.jiapi.file.ConstantPool.ClassInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.