fn parse_methods(decoder: &mut Decoder, constant_pool: &Pool) -> Result<Vec<Method>> {
    let count = decoder.read_u16()?;
    let mut fields = Vec::with_capacity(count as usize);
    for _ in 0..count {
        let access_flags = AccessFlags::from_bits_truncate(decoder.read_u16()?);
        let name = decoder.read_u16()?;
        let desc = decoder.read_u16()?;
        let attributes = parse_attributes(decoder, constant_pool)?;

        fields.push(Method {
            access_flags,
            name,
            desc,
            attributes,
        })
    }

    Ok(fields)
}
/// Parses all methods and their attributes
Parses all methods and their attributes
Parses all methods and their attributes
fn parse_methods(decoder: &mut Decoder, constant_pool: &Pool) -> Result<Vec<Method>> {
    let count = decoder.read_u16()?;
    let mut fields = Vec::with_capacity(count as usize);
    for _ in 0..count {
        let access_flags = AccessFlags::from_bits_truncate(decoder.read_u16()?);
        let name = decoder.read_u16()?;
        let desc = decoder.read_u16()?;
        let attributes = parse_attributes(decoder, constant_pool)?;
        fields.push(Method {
            access_flags,
            name,
            desc,
            attributes,
        })
    }
    Ok(fields)
}
fn parse_methods ( decoder : & mut Decoder , constant_pool : & Pool ) -> Result < Vec < Method > > { let count = decoder . read_u16 ( ) ? ; let mut fields = Vec :: with_capacity ( count as usize ) ; for _ in 0 .. count { let access_flags = AccessFlags :: from_bits_truncate ( decoder . read_u16 ( ) ? ) ; let name = decoder . read_u16 ( ) ? ; let desc = decoder . read_u16 ( ) ? ; let attributes = parse_attributes ( decoder , constant_pool ) ? ; fields . push ( Method { access_flags , name , desc , attributes , } ) } Ok ( fields ) }
Parses all methods and their attributes
Parses all methods and their attributes
decoder
&mut Decoder
constant_pool
&Pool