01: /*
02: * RuntimeVisibleParameterAnnotationsAttrInfo.java
03: *
04: * Created on April 20, 2005, 4:23 PM
05: */
06:
07: package com.yworks.yguard.obf.classfile;
08:
09: /**
10: *
11: * @author muellese
12: */
13: public class RuntimeVisibleParameterAnnotationsAttrInfo extends
14: AttrInfo {
15: private int u1parameterCount;
16: private ParameterAnnotationInfo[] annotations;
17:
18: /** Creates a new instance of RuntimeVisibleParameterAnnotationsAttrInfo */
19: public RuntimeVisibleParameterAnnotationsAttrInfo(ClassFile cf,
20: int attrNameIndex, int attrLength) {
21: super (cf, attrNameIndex, attrLength);
22: }
23:
24: protected ParameterAnnotationInfo[] getParameterAnnotations() {
25: return annotations;
26: }
27:
28: protected String getAttrName() {
29: return ClassConstants.ATTR_RuntimeVisibleParameterAnnotations;
30: }
31:
32: public void writeInfo(java.io.DataOutput dout)
33: throws java.io.IOException {
34: dout.writeByte(u1parameterCount);
35: for (int i = 0; i < u1parameterCount; i++) {
36: annotations[i].write(dout);
37: }
38: }
39:
40: protected void markUtf8RefsInInfo(ConstantPool pool) {
41: for (int i = 0; i < u1parameterCount; i++) {
42: annotations[i].markUtf8RefsInInfo(pool);
43: }
44: }
45:
46: protected void readInfo(java.io.DataInput din)
47: throws java.io.IOException {
48: u1parameterCount = din.readUnsignedByte();
49: annotations = new ParameterAnnotationInfo[u1parameterCount];
50: for (int i = 0; i < u1parameterCount; i++) {
51: annotations[i] = ParameterAnnotationInfo.create(din);
52: }
53: }
54:
55: }
|