| 1 6 7 package com.yworks.yguard.obf.classfile; 8 9 import java.io.DataInput ; 10 import java.io.DataOutput ; 11 12 16 public class ParameterAnnotationInfo 17 { 18 19 21 22 private int u2annotationCount; 24 private AnnotationInfo[] annotations; 25 26 27 public static ParameterAnnotationInfo create(DataInput din) throws java.io.IOException  29 { 30 if (din == null) throw new NullPointerException ("DataInput cannot be null!"); 31 ParameterAnnotationInfo an = new ParameterAnnotationInfo(); 32 an.read(din); 33 return an; 34 } 35 36 private ParameterAnnotationInfo() 38 {} 39 40 protected AnnotationInfo[] getAnnotations(){ 41 return annotations; 42 } 43 44 protected void markUtf8RefsInInfo(ConstantPool pool) { 45 for (int i = 0; i < u2annotationCount; i++){ 46 annotations[i].markUtf8RefsInInfo(pool); 47 } 48 } 49 50 51 private void read(DataInput din) throws java.io.IOException  52 { 53 u2annotationCount = din.readUnsignedShort(); 54 annotations = new AnnotationInfo[u2annotationCount]; 55 for (int i = 0; i < u2annotationCount; i++) 56 { 57 annotations[i] = AnnotationInfo.create(din); 58 } 59 } 60 61 62 public void write(DataOutput dout) throws java.io.IOException  63 { 64 dout.writeShort(u2annotationCount); 65 for (int i = 0; i < u2annotationCount; i++) 66 { 67 annotations[i].write(dout); 68 } 69 } 70 } 71 | Popular Tags |