MCPcopy Create free account
hub / github.com/cretz/stackparam / read_method

Method read_method

src/bytecode/io/reader.rs:255–268  ·  view source on GitHub ↗
(reader: &mut BlockReader, cf: &ClassFragment)

Source from the content-addressed store, hash-verified

253 }
254
255 fn read_method(reader: &mut BlockReader, cf: &ClassFragment) -> Result<Method, Error> {
256 match ClassReader::require_n(reader, 6, |mut r| { (r.get_u16(), r.get_u16(), r.get_u16()) }) {
257 Ok((flags, n_idx, d_idx)) => match ClassReader::read_attributes(reader, cf) {
258 Ok(attributes) => Ok(Method {
259 access_flags: AccessFlags::of(flags),
260 name_index: ConstantPoolIndex::new(n_idx as usize),
261 descriptor_index: ConstantPoolIndex::new(d_idx as usize),
262 attributes: attributes
263 }),
264 Err(err) => Err(err)
265 },
266 Err(err) => Err(err)
267 }
268 }
269
270 fn read_class_attributes(reader: &mut BlockReader, cf: &ClassFragment) -> Result<ClassFragment, Error> {
271 match ClassReader::read_attributes(reader, cf) {

Callers

nothing calls this directly

Calls 1

get_u16Method · 0.80

Tested by

no test coverage detected