lvm-class 0.7.2

JVM class file parser and writer for the Lagertha VM project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::member::MethodInfo;

impl MethodInfo {
    pub fn write_to(&self, buf: &mut Vec<u8>) {
        buf.extend_from_slice(&self.access_flags.get_raw().to_be_bytes());
        buf.extend_from_slice(&self.name_index.to_be_bytes());
        buf.extend_from_slice(&self.descriptor_index.to_be_bytes());
        buf.extend_from_slice(&(self.attributes.len() as u16).to_be_bytes());
        for attr in &self.attributes {
            attr.write_to(buf);
        }
    }
}