Package org.apache.harmony.unpack200.bytecode

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


                        theMethod));
                enclosingMethodIndex++;
            }
            if (signatureLayout.matches(flag)) {
                long result = classSignature[signatureIndex];
                CPUTF8 value = (CPUTF8) signatureLayout.getValue(result, cpBands
                        .getConstantPool());
                classAttributes[i].add(new SignatureAttribute(value));
                signatureIndex++;
            }
            if (innerClassLayout.matches(flag)) {
View Full Code Here


                int nextT = T[T_index++];
                nestedArray[i] = new ElementValue(nextT, getNextValue(nextT));
            }
            return nestedArray;
        case '@':
            CPUTF8 type = nesttype_RS[nesttype_RS_Index++];
            int numPairs = nestpair_N[nestpair_N_Index++];

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

        return cpUTF8;
    }

    public CPUTF8 cpUTF8Value(int index) {
        String string = cpUTF8[index];
        CPUTF8 cputf8 = (CPUTF8) stringsToCPUTF8.get(string);
        if (cputf8 == null) {
            cputf8 = new CPUTF8(string, index);
            stringsToCPUTF8.put(string, cputf8);
        } else if(cputf8.getGlobalIndex() > index) {
            cputf8.setGlobalIndex(index);
        }
        return cputf8;
    }
View Full Code Here

    public CPUTF8 cpUTF8Value(String string) {
        return cpUTF8Value(string, true);
    }

    public CPUTF8 cpUTF8Value(String string, boolean searchForIndex) {
        CPUTF8 cputf8 = (CPUTF8) stringsToCPUTF8.get(string);
        if (cputf8 == null) {
          Integer index = null;
            if(searchForIndex) {
              index = (Integer)mapUTF8.get(string);
            }
            if(index != null) {
              return cpUTF8Value(index.intValue());
            }
            /* TODO: mapSignature is not filled anywhere
            if(searchForIndex) {
                index = (Integer)mapSignature.get(string);
            }
            if(index != null) {
              return cpSignatureValue(index.intValue());
            }*/
            cputf8 = new CPUTF8(string, -1);
            stringsToCPUTF8.put(string, cputf8);
        }
        return cputf8;
    }
View Full Code Here

                .get(descriptor);
        if (cpNameAndType == null) {
            int nameIndex = cpDescriptorNameInts[index];
            int descriptorIndex = cpDescriptorTypeInts[index];

            CPUTF8 name = cpUTF8Value(nameIndex);
            CPUTF8 descriptorU = cpSignatureValue(descriptorIndex);
            cpNameAndType = new CPNameAndType(name, descriptorU, index + descrOffset);
            descriptorsToCPNameAndTypes.put(descriptor, cpNameAndType);
        }
        return cpNameAndType;
    }
View Full Code Here

            globalIndex = cpSignatureInts[index];
        } else {
            globalIndex = index + signatureOffset;
        }
        String string = cpSignature[index];
        CPUTF8 cpUTF8 = (CPUTF8) stringsToCPUTF8.get(string);
        if(cpUTF8 == null) {
            cpUTF8 = new CPUTF8(string, globalIndex);
            stringsToCPUTF8.put(string, cpUTF8);
        }
        return cpUTF8;
    }
View Full Code Here

            }
            int colon = descriptor.indexOf(':');
            String nameString = descriptor.substring(0, colon);
            String descriptorString = descriptor.substring(colon + 1);

            CPUTF8 name = cpUTF8Value(nameString, true);
            CPUTF8 descriptorU = cpUTF8Value(descriptorString, true);
            cpNameAndType = new CPNameAndType(name, descriptorU, -1 + descrOffset);
            descriptorsToCPNameAndTypes.put(descriptor, cpNameAndType);
        }
        return cpNameAndType;
    }
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 = (CPUTF8) signatureLayout.getValue(result,
                            type, cpBands.getConstantPool());
                    fieldAttributes[i][j].add(new SignatureAttribute(value));
                    signatureIndex++;
                }
            }
View Full Code Here

                    String type = desc.substring(colon + 1);
                    // TODO Got to get better at this ... in any case, it should
                    // be e.g. KIB or KIH
                    if (type.equals("B") || type.equals("H"))
                        type = "I";
                    CPUTF8 value = (CPUTF8) methodSignatureLayout.getValue(
                            result, type, cpBands.getConstantPool());
                    methodAttributes[i][j]
                            .add(new SignatureAttribute(value));
                    methodSignatureIndex++;
                }
View Full Code Here

                        theMethod));
                enclosingMethodIndex++;
            }
            if (signatureLayout.matches(flag)) {
                long result = classSignature[signatureIndex];
                CPUTF8 value = (CPUTF8) signatureLayout.getValue(result, cpBands
                        .getConstantPool());
                classAttributes[i].add(new SignatureAttribute(value));
                signatureIndex++;
            }
            if (innerClassLayout.matches(flag)) {
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.