Package org.apache.harmony.unpack200.bytecode

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


                    int nextT = ((Integer)T_iterator.next()).intValue();
                    nestedArray[i] = new ElementValue(nextT, getNextValue(nextT));
                }
                return nestedArray;
            case '@':
                CPUTF8 type = (CPUTF8) nesttype_RS_Iterator.next();
                int numPairs = ((Integer)nestpair_N_Iterator.next()).intValue();

                return getAnnotation(type, numPairs, nestname_RU_Iterator);
        }
        return null;
View Full Code Here


        if (index == -1) {
            return null;
        } else if (index < 0) {
            throw new Pack200Exception("Cannot have a negative range");
        } else if (cp == UTF_8) {
            return new CPUTF8(bands.getCpUTF8()[index], ClassConstantPool.DOMAIN_NORMALASCIIZ);
        } else if (cp == CP_INT) {
            return new CPInteger(new Integer(bands.getCpInt()[index]));
        } else if (cp == CP_FLOAT) {
            return new CPFloat(new Float(bands.getCpFloat()[index]));
        } else if (cp == CP_LONG) {
View Full Code Here

        for (int i1 = 0; i1 < count; i1++) {
            int index = indices[i1];
            if (index < 0 || index >= reference.length)
                throw new Pack200Exception(
                        "Something has gone wrong during parsing references, index = " + index + ", array size = " + reference.length);
            result[i1] = new CPUTF8(reference[index], ClassConstantPool.DOMAIN_UNDEFINED);
        }
        return result;
    }
View Full Code Here

        for (int i1 = 0; i1 < sum; i1++) {
            int index = indices[i1];
            if (index < 0 || index >= reference.length)
                throw new Pack200Exception(
                        "Something has gone wrong during parsing references, index = " + index + ", array size = " + reference.length);
            result1[i1] = new CPUTF8(reference[index], ClassConstantPool.DOMAIN_UNDEFINED);
        }
        CPUTF8[] refs = result1;
        int pos = 0;
        for (int i = 0; i < counts.length; i++) {
            int num = counts[i];
View Full Code Here

        for (int i1 = 0; i1 < count; i1++) {
            int index = indices[i1];
            if (index < 0 || index >= reference.length)
                throw new Pack200Exception(
                        "Something has gone wrong during parsing references, index = " + index + ", array size = " + reference.length);
            result[i1] = new CPUTF8(reference[index], ClassConstantPool.DOMAIN_UNDEFINED);
        }
        return result;
    }
View Full Code Here

        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;

        if(ic_stored[index].isAnonymous()) {
            innerClass = new CPClass(innerClassString);
        } else {
              innerClass = new CPClass(innerClassString);
              innerName = new CPUTF8(simpleClassName, ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
        }

        if(ic_stored[index].isMember()) {
            outerClass = new CPClass(outerClassString);
        }
View Full Code Here

                    // we've got a signature attribute
                    long result = fieldSignatureRS[signatureIndex];
                    String desc = fieldDescr[i][j];
                    int colon = desc.indexOf(':');
                    String type = desc.substring(colon + 1);
                    CPUTF8 value = new CPUTF8((String) signatureLayout.getValue(result, type,
                            cpBands.getConstantPool()), ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
                    fieldAttributes[i][j]
                            .add(new SignatureAttribute(value));
                    signatureIndex++;
                }
View Full Code Here

        // native signatures end up in DOMAINNORMALASCIIZ
        // while nonnatives end up in DOMAINSIGNATUREASCIIZ.
        // TODO: is this the right thing to do?
        for(int x=0; x < localVariableTableTypeRS.length; x++) {
            for(int y=0; y < localVariableTableTypeRS[x].length; y++) {
                CPUTF8 element = localVariableTableTypeRS[x][y];
                // TODO: come up with a better test for native vs nonnative signatures?
                if(element.underlyingString().length() > 2) {
                    element.setDomain(ClassConstantPool.DOMAIN_SIGNATUREASCIIZ);
                } else {
                    element.setDomain(ClassConstantPool.DOMAIN_NORMALASCIIZ);
                }
            }
        }

        int lengthLocalVariableTypeTableNBand = SegmentUtils.countMatches(
View Full Code Here

    private CPUTF8[][] stringsToCPUTF8(String[][] strings) {
        CPUTF8[][] cpUTF8s = new CPUTF8[strings.length][];
        for (int i = 0; i < strings.length; i++) {
            cpUTF8s[i] = new CPUTF8[strings[i].length];
            for (int j = 0; j < strings[i].length; j++) {
                cpUTF8s[i][j] = new CPUTF8(strings[i][j], ClassConstantPool.DOMAIN_NORMALASCIIZ);
            }
        }
        return cpUTF8s;
    }
View Full Code Here


    private CPUTF8[] stringsToCPUTF8(String[] strings) {
        CPUTF8[] cpUTF8s = new CPUTF8[strings.length];
        for (int i = 0; i < strings.length; i++) {
            cpUTF8s[i] = new CPUTF8(strings[i], ClassConstantPool.DOMAIN_UNDEFINED);
        }
        return cpUTF8s;
    }
View Full Code Here

TOP

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

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.