Example #1
0
 /// <summary>
 /// Read a single annotation structure.
 /// </summary>
 private Annotation ReadAnnotation(ConstantPool cp)
 {
     var typeIndex = stream.ReadU2();
     var numPairs = stream.ReadU2();
     var pairs = new ElementValuePair[numPairs];
     for (var j = 0; j < numPairs; j++)
     {
         var nameIndex = stream.ReadU2();
         var value = ReadElementValue(cp);
         pairs[j] = new ElementValuePair(cp, nameIndex, value);
     }
     return new Annotation(cp, typeIndex, pairs);
 }
Example #2
0
 /// <summary>
 /// Default ctor
 /// </summary>
 /// <param name="cp"></param>
 /// <param name="typeIndex"></param>
 /// <param name="valuePairs"></param>
 internal Annotation(ConstantPool cp, int typeIndex, ElementValuePair[] valuePairs)
 {
     this.cp = cp;
     this.typeIndex = typeIndex;
     this.valuePairs = valuePairs;
 }