KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > yworks > yguard > obf > classfile > RuntimeVisibleParameterAnnotationsAttrInfo


1 /*
2  * RuntimeVisibleParameterAnnotationsAttrInfo.java
3  *
4  * Created on April 20, 2005, 4:23 PM
5  */

6
7 package com.yworks.yguard.obf.classfile;
8
9 /**
10  *
11  * @author muellese
12  */

13 public class RuntimeVisibleParameterAnnotationsAttrInfo extends AttrInfo
14 {
15   private int u1parameterCount;
16   private ParameterAnnotationInfo[] annotations;
17   
18   /** Creates a new instance of RuntimeVisibleParameterAnnotationsAttrInfo */
19   public RuntimeVisibleParameterAnnotationsAttrInfo(ClassFile cf, int attrNameIndex, int attrLength)
20   {
21     super(cf, attrNameIndex, attrLength);
22   }
23
24   protected ParameterAnnotationInfo[] getParameterAnnotations(){
25     return annotations;
26   }
27
28   protected String JavaDoc getAttrName()
29   {
30     return ClassConstants.ATTR_RuntimeVisibleParameterAnnotations;
31   }
32
33   public void writeInfo(java.io.DataOutput JavaDoc dout) throws java.io.IOException JavaDoc
34   {
35     dout.writeByte(u1parameterCount);
36     for (int i = 0; i < u1parameterCount; i++){
37       annotations[i].write(dout);
38     }
39   }
40   
41     protected void markUtf8RefsInInfo(ConstantPool pool) {
42       for (int i = 0; i < u1parameterCount; i++){
43         annotations[i].markUtf8RefsInInfo(pool);
44       }
45     }
46
47
48   protected void readInfo(java.io.DataInput JavaDoc din) throws java.io.IOException JavaDoc
49   {
50     u1parameterCount = din.readUnsignedByte();
51     annotations = new ParameterAnnotationInfo[u1parameterCount];
52     for (int i = 0; i < u1parameterCount; i++){
53       annotations[i] = ParameterAnnotationInfo.create(din);
54     }
55   }
56
57   
58 }
59
Popular Tags