classfile,passes,jar: model PermittedSubclasses, normalize interface flags, name class in write errors
This commit is contained in:
parent
e9d5e44b9e
commit
9a33cef9b1
11 changed files with 299 additions and 85 deletions
|
|
@ -145,6 +145,13 @@ pub(super) fn convert(attr: &Attribute, pool: &mut Pool) -> Result<RtAttr, Class
|
|||
.map(|name| pool.class(name))
|
||||
.collect::<Result<_, _>>()?,
|
||||
},
|
||||
Attribute::PermittedSubclasses(classes) => RtAttr::PermittedSubclasses {
|
||||
name_index: pool.utf8("PermittedSubclasses")?,
|
||||
class_indexes: classes
|
||||
.iter()
|
||||
.map(|name| pool.class(name))
|
||||
.collect::<Result<_, _>>()?,
|
||||
},
|
||||
Attribute::ConstantValue(value) => RtAttr::ConstantValue {
|
||||
name_index: pool.utf8("ConstantValue")?,
|
||||
constant_value_index: pool.constant(value)?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue