equal
deleted
inserted
replaced
43 int descriptor_index; |
43 int descriptor_index; |
44 int attributes_count; |
44 int attributes_count; |
45 int value_cpx=0; |
45 int value_cpx=0; |
46 boolean isSynthetic=false; |
46 boolean isSynthetic=false; |
47 boolean isDeprecated=false; |
47 boolean isDeprecated=false; |
48 Vector attrs; |
48 Vector<AttrData> attrs; |
49 |
49 |
50 public FieldData(ClassData cls){ |
50 public FieldData(ClassData cls){ |
51 this.cls=cls; |
51 this.cls=cls; |
52 } |
52 } |
53 |
53 |
58 access = in.readUnsignedShort(); |
58 access = in.readUnsignedShort(); |
59 name_index = in.readUnsignedShort(); |
59 name_index = in.readUnsignedShort(); |
60 descriptor_index = in.readUnsignedShort(); |
60 descriptor_index = in.readUnsignedShort(); |
61 // Read the attributes |
61 // Read the attributes |
62 int attributes_count = in.readUnsignedShort(); |
62 int attributes_count = in.readUnsignedShort(); |
63 attrs=new Vector(attributes_count); |
63 attrs=new Vector<AttrData>(attributes_count); |
64 for (int i = 0; i < attributes_count; i++) { |
64 for (int i = 0; i < attributes_count; i++) { |
65 int attr_name_index=in.readUnsignedShort(); |
65 int attr_name_index=in.readUnsignedShort(); |
66 if (cls.getTag(attr_name_index)!=CONSTANT_UTF8) continue; |
66 if (cls.getTag(attr_name_index)!=CONSTANT_UTF8) continue; |
67 String attr_name=cls.getString(attr_name_index); |
67 String attr_name=cls.getString(attr_name_index); |
68 if (attr_name.equals("ConstantValue")){ |
68 if (attr_name.equals("ConstantValue")){ |
97 |
97 |
98 /** |
98 /** |
99 * Returns access of a field. |
99 * Returns access of a field. |
100 */ |
100 */ |
101 public String[] getAccess(){ |
101 public String[] getAccess(){ |
102 Vector v = new Vector(); |
102 Vector<String> v = new Vector<String>(); |
103 if ((access & ACC_PUBLIC) !=0) v.addElement("public"); |
103 if ((access & ACC_PUBLIC) !=0) v.addElement("public"); |
104 if ((access & ACC_PRIVATE) !=0) v.addElement("private"); |
104 if ((access & ACC_PRIVATE) !=0) v.addElement("private"); |
105 if ((access & ACC_PROTECTED) !=0) v.addElement("protected"); |
105 if ((access & ACC_PROTECTED) !=0) v.addElement("protected"); |
106 if ((access & ACC_STATIC) !=0) v.addElement("static"); |
106 if ((access & ACC_STATIC) !=0) v.addElement("static"); |
107 if ((access & ACC_FINAL) !=0) v.addElement("final"); |
107 if ((access & ACC_FINAL) !=0) v.addElement("final"); |