Package org.apache.harmony.unpack200.bytecode

Examples of org.apache.harmony.unpack200.bytecode.CPClass


           
            String innerClassString = ic_stored[index].thisClassString();
            String outerClassString = ic_stored[index].outerClassString();
            String simpleClassName = ic_stored[index].simpleClassName();

            CPClass innerClass = null;
            CPUTF8 innerName = null;
            CPClass outerClass = null;

            innerClass = innerClassIndex != -1 ? cpBands
                    .cpClassValue(innerClassIndex) : cpBands
                    .cpClassValue(innerClassString);
            if (!ic_stored[index].isAnonymous()) {
View Full Code Here


    public CPClass cpClassValue(int index) {
        String string = cpClass[index];
        int utf8Index = cpClassInts[index];
        int globalIndex = classOffset + index;
        CPClass cpString = (CPClass) stringsToCPClass.get(string);
        if (cpString == null) {
            cpString = new CPClass(cpUTF8Value(utf8Index,
                    ClassConstantPool.DOMAIN_NORMALASCIIZ), globalIndex);
            stringsToCPClass.put(string, cpString);
        }
        return cpString;
    }
View Full Code Here

        }
        return cpString;
    }

    public CPClass cpClassValue(String string) {
        CPClass cpString = (CPClass) stringsToCPClass.get(string);
        if (cpString == null) {
            int index = search(cpClass, string);
            if(index != -1) {
                return cpClassValue(index);
            }
            cpString = new CPClass(cpUTF8Value(string,
                    ClassConstantPool.DOMAIN_NORMALASCIIZ, false), -1);
            stringsToCPClass.put(string, cpString);
        }
        return cpString;
    }
View Full Code Here

                }
                classAttributes[i].add(new SourceFileAttribute((CPUTF8)value));
                sourceFileIndex++;
            }
            if (enclosingMethodLayout.matches(flag)) {
                CPClass theClass = cpBands
                        .cpClassValue(enclosingMethodRC[enclosingMethodIndex]);
                CPNameAndType theMethod = cpBands
                        .cpNameAndTypeValue(enclosingMethodRDN[enclosingMethodIndex]);
                classAttributes[i].add(new EnclosingMethodAttribute(theClass,
                        theMethod));
View Full Code Here

                            .getClassSuperInts()[c]]);
                    List exceptionTable = new ArrayList();
                    if (handlerCount != null) {
                        for (int j = 0; j < handlerCount[i]; j++) {
                            int handlerClass = handlerClassTypes[i][j] - 1;
                            CPClass cpHandlerClass = null;
                            if (handlerClass != -1) {
                                // The handlerClass will be null if the
                                // catch is a finally (that is, the
                                // exception table catch_type should be 0
                                cpHandlerClass = segment.getCpBands()
View Full Code Here

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

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

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

        public CPDouble cpDoubleValue(int index) {
            return new CPDouble(new Double(2.5D), index);
        }
View Full Code Here

            int descriptorIndex = classBands.getFieldDescrInts()[classNum][i];
            int nameIndex = cpBands.getCpDescriptorNameInts()[descriptorIndex];
            int typeIndex = cpBands.getCpDescriptorTypeInts()[descriptorIndex];
            CPUTF8 name = cpBands.cpUTF8Value(nameIndex);
            CPUTF8 descriptor = cpBands.cpSignatureValue(typeIndex);
            cfFields[i] = cp.add(new CPField(name, descriptor, classBands
                    .getFieldFlags()[classNum][i], classBands
                    .getFieldAttributes()[classNum][i]));
        }
        // add methods
        ClassFileEntry cfMethods[] = new ClassFileEntry[classBands
View Full Code Here

        public CPDouble cpDoubleValue(int index) {
            return new CPDouble(new Double(2.5D), index);
        }

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

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

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

TOP

Related Classes of org.apache.harmony.unpack200.bytecode.CPClass

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.