pub struct MethodInfo<'a> {
pub access_flags: MethodAccessFlags,
pub name_index: CpIndex,
pub descriptor_index: CpIndex,
pub attributes: Vec<AttributeInfo<'a>>,
}Expand description
A single method of a class.
See JVMS §4.6.
Fields§
§access_flags: MethodAccessFlags§name_index: CpIndex§descriptor_index: CpIndex§attributes: Vec<AttributeInfo<'a>>Implementations§
Source§impl<'a> MethodInfo<'a>
impl<'a> MethodInfo<'a>
Sourcepub fn try_read(
constant_pool: &ConstantPool<'a>,
cursor: &mut Cursor<'a>,
) -> Result<Self>
pub fn try_read( constant_pool: &ConstantPool<'a>, cursor: &mut Cursor<'a>, ) -> Result<Self>
Reads one method, validating its constant pool references.
Sourcepub fn signature(
&self,
constant_pool: &ConstantPool<'a>,
) -> Result<Option<Cow<'a, str>>>
pub fn signature( &self, constant_pool: &ConstantPool<'a>, ) -> Result<Option<Cow<'a, str>>>
Returns the generic signature from the Signature attribute, if present.
Sourcepub fn name(&self, constant_pool: &ConstantPool<'a>) -> Result<Cow<'a, str>>
pub fn name(&self, constant_pool: &ConstantPool<'a>) -> Result<Cow<'a, str>>
Returns the method name.
Sourcepub fn descriptor(
&self,
constant_pool: &ConstantPool<'a>,
) -> Result<Cow<'a, str>>
pub fn descriptor( &self, constant_pool: &ConstantPool<'a>, ) -> Result<Cow<'a, str>>
Returns the method descriptor.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MethodInfo<'a>
impl<'a> RefUnwindSafe for MethodInfo<'a>
impl<'a> Send for MethodInfo<'a>
impl<'a> Sync for MethodInfo<'a>
impl<'a> Unpin for MethodInfo<'a>
impl<'a> UnsafeUnpin for MethodInfo<'a>
impl<'a> UnwindSafe for MethodInfo<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more