Package org.apache.harmony.pack200.bytecode.AnnotationsAttribute

Examples of org.apache.harmony.pack200.bytecode.AnnotationsAttribute.ElementValue


                    for (int i = 0; i < param_NB.length; i++) {
                        attributes.add(getParameterAttribute(param_NB[i], name_RU_Iterator));
                    }
                } else { // type.equals("AD")
                    for (int i = 0; i < T.length; i++) {
                        attributes.add(new AnnotationDefaultAttribute(new ElementValue(T[i], getNextValue(T[i]))));
                    }
                }
            }
        }
        return attributes;
View Full Code Here


        CPUTF8[] elementNames = new CPUTF8[pairCount];
        ElementValue[] elementValues = new ElementValue[pairCount];
        for (int j = 0; j < elementNames.length; j++) {
           elementNames[j] = (CPUTF8) namesIterator.next();
           int t = ((Integer)T_iterator.next()).intValue();
           elementValues[j] = new ElementValue(t, getNextValue(t));
        }
        return new Annotation(pairCount, type, elementNames, elementValues);
    }
View Full Code Here

            case '[':
                int arraySize = ((Integer)casearray_Iterator.next()).intValue();
                ElementValue[] nestedArray = new ElementValue[arraySize];
                for (int i = 0; i < arraySize; i++) {
                    int nextT = ((Integer)T_iterator.next()).intValue();
                    nestedArray[i] = new ElementValue(nextT, getNextValue(nextT));
                }
                return nestedArray;
            case '@':
                CPUTF8 type = (CPUTF8) nesttype_RS_Iterator.next();
                int numPairs = ((Integer)nestpair_N_Iterator.next()).intValue();
View Full Code Here

                    for (int i = 0; i < param_NB.length; i++) {
                        attributes.add(getParameterAttribute(param_NB[i], name_RU_Iterator));
                    }
                } else { // type.equals("AD")
                    for (int i = 0; i < T.length; i++) {
                        attributes.add(new AnnotationDefaultAttribute(new ElementValue(T[i], getNextValue(T[i]))));
                    }
                }
            }
        }
        return attributes;
View Full Code Here

        CPUTF8[] elementNames = new CPUTF8[pairCount];
        ElementValue[] elementValues = new ElementValue[pairCount];
        for (int j = 0; j < elementNames.length; j++) {
           elementNames[j] = (CPUTF8) namesIterator.next();
           int t = ((Integer)T_iterator.next()).intValue();
           elementValues[j] = new ElementValue(t, getNextValue(t));
        }
        return new Annotation(pairCount, type, elementNames, elementValues);
    }
View Full Code Here

            case '[':
                int arraySize = ((Integer)casearray_Iterator.next()).intValue();
                ElementValue[] nestedArray = new ElementValue[arraySize];
                for (int i = 0; i < arraySize; i++) {
                    int nextT = ((Integer)T_iterator.next()).intValue();
                    nestedArray[i] = new ElementValue(nextT, getNextValue(nextT));
                }
                return nestedArray;
            case '@':
                CPUTF8 type = (CPUTF8) nesttype_RS_Iterator.next();
                int numPairs = ((Integer)nestpair_N_Iterator.next()).intValue();
View Full Code Here

                if (n > 0) {
                   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(cpBands.getCpClass()[(int) result]);
                       }
                   }
                   methodExceptions[i][j] = new ExceptionsAttribute(exceptions);
                   methodAttributes[i][j].add(methodExceptions[i][j]);
               }
View Full Code Here

          .add(new SourceFileAttribute(fileName)) };
    } else {
      classFile.attributes = new Attribute[] {};
    }
    // this/superclass
    ClassFileEntry cfThis = cp.add(new CPClass(fullName));
    ClassFileEntry cfSuper = cp.add(new CPClass(classBands.getClassSuper()[classNum]));
    // add interfaces
    ClassFileEntry cfInterfaces[] = new ClassFileEntry[classBands.getClassInterfaces()[classNum].length];
    for (i = 0; i < cfInterfaces.length; i++) {
      cfInterfaces[i] = cp.add(new CPClass(classBands.getClassInterfaces()[classNum][i]));
    }
    // add fields
    ClassFileEntry cfFields[] = new ClassFileEntry[classBands.getClassFieldCount()[classNum]];
    // fieldDescr and fieldFlags used to create this
    for (i = 0; i < cfFields.length; i++) {
View Full Code Here

    }
    // add fields
    ClassFileEntry cfFields[] = new ClassFileEntry[classBands.getClassFieldCount()[classNum]];
    // fieldDescr and fieldFlags used to create this
    for (i = 0; i < cfFields.length; i++) {
      cfFields[i] = cp.add(new CPField(classBands.getFieldDescr()[classNum][i],
                    classBands.getFieldFlags()[classNum][i], classBands.getFieldAttributes()[classNum][i]));
    }
    // add methods
    ClassFileEntry cfMethods[] = new ClassFileEntry[classBands.getClassMethodCount()[classNum]];
    // fieldDescr and fieldFlags used to create this
View Full Code Here

    }
    // add methods
    ClassFileEntry cfMethods[] = new ClassFileEntry[classBands.getClassMethodCount()[classNum]];
    // fieldDescr and fieldFlags used to create this
    for (i = 0; i < cfMethods.length; i++) {
      cfMethods[i] = cp.add(new CPMethod(classBands.getMethodDescr()[classNum][i],
                    classBands.getMethodFlags()[classNum][i], classBands.getMethodAttributes()[classNum][i]));
    }
    // sort CP according to cp_All
    cp.resolve();
    // print out entries
View Full Code Here

TOP

Related Classes of org.apache.harmony.pack200.bytecode.AnnotationsAttribute.ElementValue

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.