pub struct JvmField {
pub name: String,
pub descriptor: String,
pub access_flags: JvmAccessFlags,
pub constant_value: Option<JvmConstantPoolEntry>,
pub attributes: Vec<JvmAttribute>,
}Expand description
JVM 字段信息(高层表示)
Fields§
§name: String字段名称
descriptor: String字段描述符
access_flags: JvmAccessFlags访问标志
constant_value: Option<JvmConstantPoolEntry>常量值(如果是常量字段)
attributes: Vec<JvmAttribute>属性列表
Implementations§
Source§impl JvmField
impl JvmField
Sourcepub fn with_access_flags(self, access_flags: JvmAccessFlags) -> Self
pub fn with_access_flags(self, access_flags: JvmAccessFlags) -> Self
设置访问标志
Sourcepub fn with_public(self) -> Self
pub fn with_public(self) -> Self
添加 public 访问修饰符
Sourcepub fn with_private(self) -> Self
pub fn with_private(self) -> Self
添加 private 访问修饰符
Sourcepub fn with_protected(self) -> Self
pub fn with_protected(self) -> Self
添加 protected 访问修饰符
Sourcepub fn with_static(self) -> Self
pub fn with_static(self) -> Self
添加 static 修饰符
Sourcepub fn with_final(self) -> Self
pub fn with_final(self) -> Self
添加 final 修饰符
Sourcepub fn with_volatile(self) -> Self
pub fn with_volatile(self) -> Self
添加 volatile 修饰符
Sourcepub fn with_transient(self) -> Self
pub fn with_transient(self) -> Self
添加 transient 修饰符
Sourcepub fn with_constant_value(self, value: JvmConstantPoolEntry) -> Self
pub fn with_constant_value(self, value: JvmConstantPoolEntry) -> Self
设置常量值
Sourcepub fn with_attribute(self, attribute: JvmAttribute) -> Self
pub fn with_attribute(self, attribute: JvmAttribute) -> Self
添加属性
Sourcepub fn with_attributes(self, attributes: Vec<JvmAttribute>) -> Self
pub fn with_attributes(self, attributes: Vec<JvmAttribute>) -> Self
添加多个属性
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JvmField
impl RefUnwindSafe for JvmField
impl Send for JvmField
impl Sync for JvmField
impl Unpin for JvmField
impl UnsafeUnpin for JvmField
impl UnwindSafe for JvmField
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