/// <exception cref="System.IO.IOException"/> public StructMethod(DataInputFullStream @in, StructClass clStruct) { /* * method_info { * u2 access_flags; * u2 name_index; * u2 descriptor_index; * u2 attributes_count; * attribute_info attributes[attributes_count]; * } */ classStruct = clStruct; accessFlags = @in.ReadUnsignedShort(); int nameIndex = @in.ReadUnsignedShort(); int descriptorIndex = @in.ReadUnsignedShort(); ConstantPool pool = clStruct.GetPool(); string[] values = pool.GetClassElement(ConstantPool.Method, clStruct.qualifiedName , nameIndex, descriptorIndex); name = values[0]; descriptor = values[1]; attributes = ReadAttributes(@in, pool); if (codeAttributes != null) { Sharpen.Collections.PutAll(attributes, codeAttributes); codeAttributes = null; } }
/// <exception cref="System.IO.IOException"/> public StructField(DataInputFullStream @in, StructClass clStruct) { /* * field_info { * u2 access_flags; * u2 name_index; * u2 descriptor_index; * u2 attributes_count; * attribute_info attributes[attributes_count]; * } */ accessFlags = @in.ReadUnsignedShort(); int nameIndex = @in.ReadUnsignedShort(); int descriptorIndex = @in.ReadUnsignedShort(); ConstantPool pool = clStruct.GetPool(); string[] values = pool.GetClassElement(ConstantPool.Field, clStruct.qualifiedName , nameIndex, descriptorIndex); name = values[0]; descriptor = values[1]; attributes = ReadAttributes(@in, pool); }