Examples of CPClass


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

                            .getClassSuper()[c]);
                    List exceptionTable = new ArrayList();
                    if(handlerCount != null) {
                        for (int j = 0; j < handlerCount[i]; j++) {
                            String handlerClass = handlerClassTypes[i][j];
                            CPClass cpHandlerClass = new CPClass(handlerClass);
                            ExceptionTableEntry entry = new ExceptionTableEntry(
                                    handlerStartPCs[i][j], handlerEndPCs[i][j],
                                    handlerCatchPCs[i][j], cpHandlerClass);
                            exceptionTable.add(entry);
                        }
View Full Code Here

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

        while(changed) {
            changed = false;
            for(int allTupleIndex=0; allTupleIndex < allTuplesSize; allTupleIndex++) {
                Iterator it = classPoolClasses.iterator();
                while(it.hasNext()) {
                    CPClass classInPool = (CPClass)it.next();
                    String poolClassName = classInPool.name;
                    if(poolClassName.equals(allTuples[allTupleIndex].thisClassString())) {
                        // If the tuple isn't already in there, then add it
                        if(relevantTuples.indexOf(allTuples[allTupleIndex]) == -1) {
                            relevantTuples.add(allTuples[allTupleIndex]);
View Full Code Here

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

    // == str
    String fileName = fullName.substring(i) + ".java";
    classFile.attributes = new Attribute[] { (Attribute) cp
        .add(new SourceFileAttribute(fileName)) };
    // this/superclass
    ClassFileEntry cfThis = cp.add(new CPClass(fullName));
    ClassFileEntry cfSuper = cp.add(new CPClass(classSuper[classNum]));
    // add interfaces
    ClassFileEntry cfInterfaces[] = new ClassFileEntry[classInterfaces[classNum].length];
    for (i = 0; i < cfInterfaces.length; i++) {
      cfInterfaces[i] = cp.add(new CPClass(classInterfaces[classNum][i]));
    }
    // add fields
    ClassFileEntry cfFields[] = new ClassFileEntry[classFieldCount[classNum]];
    // fieldDescr and fieldFlags used to create this
    for (i = 0; i < cfFields.length; i++) {
View Full Code Here

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

        int n = numExceptions[i][j];
        CPClass[] exceptions = new CPClass[n];
        if (layout.matches(flag)) {
          for (int k = 0; k < n; k++) {
            long result = codec.decode(in);
            exceptions[k] = new CPClass(cpClass[(int) result]);
          }
        }
        methodExceptions[i][j] = new ExceptionsAttribute(exceptions);
        methodAttributes[i][j].add(methodExceptions[i][j]);
      }
View Full Code Here

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

            String innerClassString = icStored.thisClassString();
            String outerClassString = icStored.outerClassString();
            String simpleClassName = icStored.simpleClassName();

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

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

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

        pool.resolve(new Segment());
        assertTrue(pool.indexOf(u1) > 0);
    }

    public void testAllClasses() {
        pool.add(new CPClass(new CPUTF8("RandomClass", 1), 10));
        pool.add(new CPClass(new CPUTF8("RandomClass2", 2), 20));
        assertEquals(2, pool.allClasses().size());
    }
View Full Code Here

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

        pool.resolve(new Segment());
        assertTrue(pool.indexOf(u1) > 0);
    }

    public void testAllClasses() {
        pool.add(new CPClass(new CPUTF8("RandomClass",
                ClassConstantPool.DOMAIN_NORMALASCIIZ, 1), 10));
        pool.add(new CPClass(new CPUTF8("RandomClass2",
                ClassConstantPool.DOMAIN_NORMALASCIIZ, 2), 20));
        assertEquals(2, pool.allClasses().size());
    }
View Full Code Here

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

        pool.resolve(new Segment());
        assertTrue(pool.indexOf(u1) > 0);
    }

    public void testEntries() {
        pool.add(new CPClass(new CPUTF8("RandomClass", 1), 10));
        pool.add(new CPClass(new CPUTF8("RandomClass2", 2), 20));
        assertEquals(2, pool.entries().size());
    }
View Full Code Here

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

            String innerClassString = icStored.thisClassString();
            String outerClassString = icStored.outerClassString();
            String simpleClassName = icStored.simpleClassName();

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

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

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

                }
                classAttributes[i].add(new SourceFileAttribute((CPUTF8)value));
                sourceFileIndex++;
            }
            if (enclosingMethodLayout.matches(flag)) {
                CPClass theClass = cpBands
                        .cpClassValue(enclosingMethodRC[enclosingMethodIndex]);
                CPNameAndType theMethod = null;
                if(enclosingMethodRDN[enclosingMethodIndex] != 0) {
                    theMethod = cpBands
                            .cpNameAndTypeValue(enclosingMethodRDN[enclosingMethodIndex] - 1);
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.