Package org.apache.harmony.unpack200.bytecode

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


                           methodByteCodePacked[c][m], segment, operandManager);
                   methodAttributes[c][m].add(attr);
                   // Should I add all the attributes in here?
                 ArrayList currentAttributes = (ArrayList)orderedCodeAttributes.get(i);
                 for(int index=0;index < currentAttributes.size(); index++) {
                     Attribute currentAttribute = (Attribute)currentAttributes.get(index);
                     // TODO: The line below adds the LocalVariableTable
                     // and LineNumber attributes. Currently things are
                     // broken because these tables don't get renumbered
                     // properly. Commenting out the add so the class files
                     // will verify.
                     //attr.attributes.add(currentAttribute);
                     // Fix up the line numbers if needed
                     if(currentAttribute.hasBCIRenumbering()) {
                         ((BCIRenumberedAttribute)currentAttribute).renumber(attr.byteCodeOffsets);
                     }
                 }
                 i++;
               }
View Full Code Here


    public ArrayList getOrderedCodeAttributes() {
        ArrayList orderedAttributeList = new ArrayList();
        for(int classIndex=0; classIndex < codeAttributes.length; classIndex++) {
            ArrayList currentAttributes = new ArrayList();
            for(int attributeIndex = 0; attributeIndex < codeAttributes[classIndex].size(); attributeIndex++) {
                Attribute attribute = (Attribute)codeAttributes[classIndex].get(attributeIndex);
                currentAttributes.add(attribute);
            }
            orderedAttributeList.add(currentAttributes);
        }
        return orderedAttributeList;
View Full Code Here

    public ArrayList getOrderedCodeAttributes() {
        ArrayList orderedAttributeList = new ArrayList();
        for(int classIndex=0; classIndex < codeAttributes.length; classIndex++) {
            ArrayList currentAttributes = new ArrayList();
            for(int attributeIndex = 0; attributeIndex < codeAttributes[classIndex].size(); attributeIndex++) {
                Attribute attribute = (Attribute)codeAttributes[classIndex].get(attributeIndex);
                currentAttributes.add(attribute);
            }
            orderedAttributeList.add(currentAttributes);
        }
        return orderedAttributeList;
View Full Code Here

                            operandManager, exceptionTable);
                    methodAttributes[c][m].add(codeAttr);
                    codeAttr.renumber(codeAttr.byteCodeOffsets);
                 ArrayList currentAttributes = (ArrayList)orderedCodeAttributes.get(i);
                 for(int index=0;index < currentAttributes.size(); index++) {
                     Attribute currentAttribute = (Attribute)currentAttributes.get(index);
                     codeAttr.addAttribute(currentAttribute);
                     // Fix up the line numbers if needed
                     if(currentAttribute.hasBCIRenumbering()) {
                         ((BCIRenumberedAttribute)currentAttribute).renumber(codeAttr.byteCodeOffsets);
                     }
                 }
                 i++;
               }
View Full Code Here

    public void testJustResourcesGZip() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/JustResources.pack.gz");
        file = File.createTempFile("Just", "ResourcesGz.jar");
        out = new JarOutputStream(new FileOutputStream(file));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }
View Full Code Here

    public void testWithSqlE1() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql-e1.pack.gz");
        file = File.createTempFile("sql-e1", ".jar");
        out = new JarOutputStream(new FileOutputStream(file));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }
View Full Code Here

    public void testWithSql() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
        file = File.createTempFile("sql", ".jar");
        out = new JarOutputStream(new FileOutputStream(file));
        Archive archive = new Archive(in, out);
        archive.unpack();
        JarFile jarFile = new JarFile(file);
        file.deleteOnExit();

        JarFile jarFile2 = new JarFile(new File(Archive.class.getResource(
                "/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI()));
View Full Code Here

    public void testWithPack200E1() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/pack200-e1.pack.gz");
        file = File.createTempFile("p200-e1", ".jar");
        out = new JarOutputStream(new FileOutputStream(file));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }
View Full Code Here

    public void testWithPack200() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/pack200.pack.gz");
        file = File.createTempFile("p200", ".jar");
        out = new JarOutputStream(new FileOutputStream(file));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }
View Full Code Here

    public void testWithJNDIE1() throws Exception {
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/jndi-e1.pack.gz");
        file = File.createTempFile("jndi-e1", ".jar");
        out = new JarOutputStream(new FileOutputStream(file));
        Archive archive = new Archive(in, out);
        archive.unpack();
    }
View Full Code Here

TOP

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

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.