Package org.apache.harmony.pack200.bytecode

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


                    // be e.g. KIB or KIH
                    if (type.equals("B") || type.equals("H"))
                        type = "I";
                    Object value = layout.getValue(result, type, cpBands.getConstantPool());
                    fieldAttributes[i][j]
                            .add(new ConstantValueAttribute(value));
                    debug("Processed value " + value + " for ConstantValue");
                }
            }
        }
        debug("unimplemented field_Signature_RS");
View Full Code Here


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

    IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
    boolean ic_local_sent = false;
    if(ic_local != null) {
        ic_local_sent = true;
    }
    InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute("InnerClasses");
    IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
    IcTuple[] ic_stored = computeIcStored(ic_local, ic_relevant);
    for(int index = 0; index < ic_stored.length; index++) {
        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);
        }

          int flags = ic_stored[index].F;
          innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass, innerName, flags);
          addInnerClassesAttr = true;
    }
    // If ic_local is sent and it's empty, don't add
    // the inner classes attribute.
    if(ic_local_sent && (ic_local.length == 0)) {
View Full Code Here

        .getAttributeLayout(AttributeLayout.ATTRIBUTE_SOURCE_FILE,
            AttributeLayout.CONTEXT_CLASS);
    if (SOURCE_FILE.matches(classBands.getClassFlags()[classNum])) {
      String fileName = fullName.substring(i) + ".java";
      classFile.attributes = new Attribute[] { (Attribute) cp
          .add(new SourceFileAttribute(fileName)) };
    } else {
      classFile.attributes = new Attribute[] {};
    }
    // this/superclass
    ClassFileEntry cfThis = cp.add(new CPClass(fullName));
View Full Code Here

        // add inner class attribute (if required)
        boolean addInnerClassesAttr = false;
        IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
        boolean ic_local_sent = ic_local != null;
        InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute(
                "InnerClasses");
        IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
        List ic_stored = computeIcStored(ic_local, ic_relevant);
        for (int index = 0; index < ic_stored.size(); index++) {
          IcTuple icStored = (IcTuple)ic_stored.get(index);
            int innerClassIndex = icStored.thisClassIndex();
            int outerClassIndex = icStored.outerClassIndex();
            int simpleClassNameIndex = icStored.simpleClassNameIndex();

            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()) {
                innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
                        simpleClassNameIndex) : cpBands
                        .cpUTF8Value(simpleClassName);
            }

            if (icStored.isMember()) {
                outerClass = outerClassIndex != -1 ? cpBands
                        .cpClassValue(outerClassIndex) : cpBands
                        .cpClassValue(outerClassString);
            }
            int flags = icStored.F;
            innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass,
                    innerName, flags);
            addInnerClassesAttr = true;
        }
        // If ic_local is sent and it's empty, don't add
        // the inner classes attribute.
View Full Code Here

        // add inner class attribute (if required)
        boolean addInnerClassesAttr = false;
        IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
        boolean ic_local_sent = ic_local != null;
        InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute(
                "InnerClasses");
        IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
        List ic_stored = computeIcStored(ic_local, ic_relevant);
        for (int index = 0; index < ic_stored.size(); index++) {
          IcTuple icStored = (IcTuple)ic_stored.get(index);
            int innerClassIndex = icStored.thisClassIndex();
            int outerClassIndex = icStored.outerClassIndex();
            int simpleClassNameIndex = icStored.simpleClassNameIndex();

            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()) {
                innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
                        simpleClassNameIndex) : cpBands
                        .cpUTF8Value(simpleClassName);
            }

            if (icStored.isMember()) {
                outerClass = outerClassIndex != -1 ? cpBands
                        .cpClassValue(outerClassIndex) : cpBands
                        .cpClassValue(outerClassString);
            }
            int flags = icStored.F;
            innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass,
                    innerName, flags);
            addInnerClassesAttr = true;
        }
        // If ic_local is sent and it's empty, don't add
        // the inner classes attribute.
View Full Code Here

        // add inner class attribute (if required)
        boolean addInnerClassesAttr = false;
        IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
        boolean ic_local_sent = ic_local != null;
        InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute(
                "InnerClasses");
        IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
        List ic_stored = computeIcStored(ic_local, ic_relevant);
        for (int index = 0; index < ic_stored.size(); index++) {
          IcTuple icStored = (IcTuple)ic_stored.get(index);
            int innerClassIndex = icStored.thisClassIndex();
            int outerClassIndex = icStored.outerClassIndex();
            int simpleClassNameIndex = icStored.simpleClassNameIndex();

            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()) {
                innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
                        simpleClassNameIndex) : cpBands
                        .cpUTF8Value(simpleClassName);
            }

            if (icStored.isMember()) {
                outerClass = outerClassIndex != -1 ? cpBands
                        .cpClassValue(outerClassIndex) : cpBands
                        .cpClassValue(outerClassString);
            }
            int flags = icStored.F;
            innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass,
                    innerName, flags);
            addInnerClassesAttr = true;
        }
        // If ic_local is sent and it's empty, don't add
        // the inner classes attribute.
View Full Code Here

        // add inner class attribute (if required)
        boolean addInnerClassesAttr = false;
        IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
        boolean ic_local_sent = ic_local != null;
        InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute(
                "InnerClasses");
        IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
        List ic_stored = computeIcStored(ic_local, ic_relevant);
        for (int index = 0; index < ic_stored.size(); index++) {
          IcTuple icStored = (IcTuple)ic_stored.get(index);
            int innerClassIndex = icStored.thisClassIndex();
            int outerClassIndex = icStored.outerClassIndex();
            int simpleClassNameIndex = icStored.simpleClassNameIndex();

            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()) {
                innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
                        simpleClassNameIndex) : cpBands
                        .cpUTF8Value(simpleClassName);
            }

            if (icStored.isMember()) {
                outerClass = outerClassIndex != -1 ? cpBands
                        .cpClassValue(outerClassIndex) : cpBands
                        .cpClassValue(outerClassString);
            }
            int flags = icStored.F;
            innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass,
                    innerName, flags);
            addInnerClassesAttr = true;
        }
        // If ic_local is sent and it's empty, don't add
        // the inner classes attribute.
View Full Code Here

        // add inner class attribute (if required)
        boolean addInnerClassesAttr = false;
        IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
        boolean ic_local_sent = ic_local != null;
        InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute(
                "InnerClasses");
        IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
        IcTuple[] ic_stored = computeIcStored(ic_local, ic_relevant);
        for (int index = 0; index < ic_stored.length; index++) {
            int innerClassIndex = ic_stored[index].thisClassIndex();
            int outerClassIndex = ic_stored[index].outerClassIndex();
            int simpleClassNameIndex = ic_stored[index].simpleClassNameIndex();

            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;

            innerClass = innerClassIndex != -1 ? cpBands
                    .cpClassValue(innerClassIndex) : cpBands
                    .cpClassValue(innerClassString);
            if (!ic_stored[index].isAnonymous()) {
                innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
                        simpleClassNameIndex) : cpBands
                        .cpUTF8Value(simpleClassName);
            }

            if (ic_stored[index].isMember()) {
                outerClass = outerClassIndex != -1 ? cpBands
                        .cpClassValue(outerClassIndex) : cpBands
                        .cpClassValue(outerClassString);
            }
            int flags = ic_stored[index].F;
            innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass,
                    innerName, flags);
            addInnerClassesAttr = true;
        }
        // If ic_local is sent and it's empty, don't add
        // the inner classes attribute.
View Full Code Here

        // add inner class attribute (if required)
        boolean addInnerClassesAttr = false;
        IcTuple[] ic_local = getClassBands().getIcLocal()[classNum];
        boolean ic_local_sent = ic_local != null;
        InnerClassesAttribute innerClassesAttribute = new InnerClassesAttribute(
                "InnerClasses");
        IcTuple[] ic_relevant = getIcBands().getRelevantIcTuples(fullName, cp);
        IcTuple[] ic_stored = computeIcStored(ic_local, ic_relevant);
        for (int index = 0; index < ic_stored.length; index++) {
            int innerClassIndex = ic_stored[index].thisClassIndex();
            int outerClassIndex = ic_stored[index].outerClassIndex();
            int simpleClassNameIndex = ic_stored[index].simpleClassNameIndex();
           
            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;

            innerClass = innerClassIndex != -1 ? cpBands
                    .cpClassValue(innerClassIndex) : cpBands
                    .cpClassValue(innerClassString);
            if (!ic_stored[index].isAnonymous()) {
                innerName = simpleClassNameIndex != -1 ? cpBands.cpUTF8Value(
                        simpleClassNameIndex,
                        ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ) : cpBands
                        .cpUTF8Value(simpleClassName,
                                ClassConstantPool.DOMAIN_ATTRIBUTEASCIIZ);
            }

            if (ic_stored[index].isMember()) {
                outerClass = outerClassIndex != -1 ? cpBands
                        .cpClassValue(outerClassIndex) : cpBands
                        .cpClassValue(outerClassString);
            }
            int flags = ic_stored[index].F;
            innerClassesAttribute.addInnerClassesEntry(innerClass, outerClass,
                    innerName, flags);
            addInnerClassesAttr = true;
        }
        // If ic_local is sent and it's empty, don't add
        // the inner classes attribute.
View Full Code Here

TOP

Related Classes of org.apache.harmony.pack200.bytecode.InnerClassesAttribute

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.