Examples of CPNameAndType


Examples of org.apache.harmony.pack200.bytecode.CPNameAndType

            case 'c':
                return casec_Iterator.next();
            case 'e':
                // TODO: check this - it may not work if the first string already has a colon in it
                String enumString = caseet_Iterator.next() + ":" + caseec_Iterator.next();
                return new CPNameAndType(enumString);
            case 's':
                return cases_Iterator.next();
            case '[':
                int arraySize = ((Integer)casearray_Iterator.next()).intValue();
                ElementValue[] nestedArray = new ElementValue[arraySize];
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.CPNameAndType

            case 'c':
                return casec_Iterator.next();
            case 'e':
                // TODO: check this - it may not work if the first string already has a colon in it
                String enumString = caseet_Iterator.next() + ":" + caseec_Iterator.next();
                return new CPNameAndType(enumString);
            case 's':
                return cases_Iterator.next();
            case '[':
                int arraySize = ((Integer)casearray_Iterator.next()).intValue();
                ElementValue[] nestedArray = new ElementValue[arraySize];
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.CPNameAndType

        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 CPNameAndType(reference[index]);
        }
        return result;
    }
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.CPNameAndType

                classAttributes[i].add(new SourceFileAttribute(value));
                sourceFileIndex++;
            }
            if (enclosingMethodLayout.matches(flag)) {
                CPClass theClass = new CPClass(enclosingMethodRC[enclosingMethodIndex]);
                CPNameAndType theMethod = new CPNameAndType(enclosingMethodRDN[enclosingMethodIndex]);
                classAttributes[i].add(new EnclosingMethodAttribute(theClass, theMethod));
                enclosingMethodIndex++;
            }
            if (signatureLayout.matches(flag)) {
                long result = classSignature[signatureIndex];
View Full Code Here

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

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

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

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

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

        return cpDouble;
    }

    public CPNameAndType cpNameAndTypeValue(int index) {
        String descriptor = cpDescriptor[index];
        CPNameAndType cpNameAndType = (CPNameAndType) descriptorsToCPNameAndTypes
                .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

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

        }
        return cpUTF8;
    }

    public CPNameAndType cpNameAndTypeValue(String descriptor) {
        CPNameAndType cpNameAndType = (CPNameAndType) descriptorsToCPNameAndTypes
            .get(descriptor);
        if (cpNameAndType == null) {
          Integer index = (Integer)mapDescriptor.get(descriptor);
          if(index != null) {
            return cpNameAndTypeValue(index.intValue());
            }
            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

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

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

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

        return cpDouble;
    }

    public CPNameAndType cpNameAndTypeValue(int index) {
        String descriptor = cpDescriptor[index];
        CPNameAndType cpNameAndType = (CPNameAndType) descriptorsToCPNameAndTypes
                .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
TOP
Copyright © 2018 www.massapi.com. 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.