MCPcopy Index your code
hub / github.com/cretz/stackparam / write_class

Method write_class

src/bytecode/io/writer.rs:13–24  ·  view source on GitHub ↗
(&mut self, classfile: &Classfile)

Source from the content-addressed store, hash-verified

11 }
12
13 pub fn write_class(&mut self, classfile: &Classfile) -> Result<usize, Error> {
14 self.write_magic_bytes()
15 .and(self.write_classfile_version(&classfile.version))
16 .and(self.write_constant_pool(&classfile.constant_pool))
17 .and(self.write_access_flags(&classfile.access_flags))
18 .and(self.write_constant_pool_index(&classfile.this_class))
19 .and(self.write_constant_pool_index(&classfile.super_class))
20 .and(self.write_interfaces(&classfile.interfaces))
21 .and(self.write_fields(&classfile.fields, &classfile.constant_pool))
22 .and(self.write_methods(&classfile.methods, &classfile.constant_pool))
23 .and(self.write_attributes(&classfile.attributes, &classfile.constant_pool))
24 }
25
26 pub fn write_magic_bytes(&mut self) -> Result<usize, Error> {
27 self.write_u32(0xCAFEBABE)

Callers 2

write_classFunction · 0.80
bytecode_testsFunction · 0.80

Calls 9

write_magic_bytesMethod · 0.80
write_constant_poolMethod · 0.80
write_access_flagsMethod · 0.80
write_interfacesMethod · 0.80
write_fieldsMethod · 0.80
write_methodsMethod · 0.80
write_attributesMethod · 0.80

Tested by 1

bytecode_testsFunction · 0.64