Package org.apache.harmony.unpack200

Examples of org.apache.harmony.unpack200.Pack200PackerAdapter


        public CPString cpStringValue(int index) {
            return new CPString(cpUTF8, index);
        }

        public CPInteger cpIntegerValue(int index) {
            return new CPInteger(new Integer(21), index);
        }
View Full Code Here


        public CPString cpStringValue(int index) {
            return new CPString(cpUTF8, index);
        }

        public CPInteger cpIntegerValue(int index) {
            return new CPInteger(new Integer(21), index);
        }
View Full Code Here

        public CPMethodRef cpMethodValue(int index) {
            return new CPMethodRef(cpClass, descriptor, index);
        }

        public CPInterfaceMethodRef cpIMethodValue(int index) {
            return new CPInterfaceMethodRef(cpClass, descriptor, index);
        }
View Full Code Here

        public CPMethodRef cpMethodValue(int index) {
            return new CPMethodRef(cpClass, descriptor, index);
        }

        public CPInterfaceMethodRef cpIMethodValue(int index) {
            return new CPInterfaceMethodRef(cpClass, descriptor, index);
        }
View Full Code Here

        CPInteger cp3 = new CPInteger(new Integer(5), 5);
        checkEquality(cp1, cp2, "3", cp3); //$NON-NLS-1$
    }

    public void testCPLong() {
        CPLong cp1 = new CPLong(new Long(3), 3);
        CPLong cp2 = new CPLong(new Long(3), 3);
        CPLong cp3 = new CPLong(new Long(5), 5);
        checkEquality(cp1, cp2, "3", cp3); //$NON-NLS-1$
    }
View Full Code Here

        public CPFloat cpFloatValue(int index) {
            return new CPFloat(new Float(2.5F), index);
        }

        public CPLong cpLongValue(int index) {
            return new CPLong(new Long(21L), index);
        }
View Full Code Here

        pool.add(u2);
        assertEquals(1, pool.size());
    }

    public void testDuplicateField() {
        CPMember cp1 = new CPMember(new CPUTF8("name", 1), new CPUTF8("I", 2),
                0, null);
        pool.add(cp1);
        pool.addNestedEntries();
        assertEquals(2, pool.size());
        CPMember cp2 = new CPMember(new CPUTF8("name", 1), new CPUTF8("I", 2),
                0, null);
        pool.add(cp2);
        pool.addNestedEntries();
        assertEquals(2, pool.size());
    }
View Full Code Here

        CPString cp3 = new CPString(new CPUTF8(new String("5"), 5), 5);
        checkEquality(cp1, cp2, "3", cp3); //$NON-NLS-1$
    }

    public void testCPField() {
        CPMember cp1 = new CPMember(new CPUTF8("Name", 3), new CPUTF8("I", 4),
                0, null);
        CPMember cp2 = new CPMember(new CPUTF8("Name", 3), new CPUTF8("I", 4),
                0, null);
        CPMember cp3 = new CPMember(new CPUTF8("Name", 3), new CPUTF8("Z", 5),
                0, null);
        CPMember cp4 = new CPMember(new CPUTF8("GName", 6), new CPUTF8("I", 4),
                0, null);
        checkEquality(cp1, cp2, "Name", cp3); //$NON-NLS-1$
        checkEquality(cp1, cp2, "I", cp4); //$NON-NLS-1$
    }
View Full Code Here

//            int colon = descriptorStr.indexOf(':');
            int nameIndex = cpBands.getCpDescriptorNameInts()[descriptorIndex];
            int typeIndex = cpBands.getCpDescriptorTypeInts()[descriptorIndex];
            CPUTF8 name = cpBands.cpUTF8Value(nameIndex);
            CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex);
            cfMethods[i] = cp.add(new CPMethod(name, descriptor, classBands
                    .getMethodFlags()[classNum][i], classBands
                    .getMethodAttributes()[classNum][i]));
        }
        cp.addNestedEntries();
View Full Code Here

        public CPFieldRef cpFieldValue(int index) {
            return new CPFieldRef(cpClass, descriptor, index);
        }

        public CPMethodRef cpMethodValue(int index) {
            return new CPMethodRef(cpClass, descriptor, index);
        }
View Full Code Here

TOP

Related Classes of org.apache.harmony.unpack200.Pack200PackerAdapter

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.