mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
6866657: add byteLength method to primary classfile types
Reviewed-by: mchung
This commit is contained in:
parent
638db1aabb
commit
219445d03a
8 changed files with 197 additions and 0 deletions
|
@ -95,6 +95,13 @@ public class Attributes implements Iterable<Attribute> {
|
|||
return attrs.length;
|
||||
}
|
||||
|
||||
public int byteLength() {
|
||||
int length = 2;
|
||||
for (Attribute a: attrs)
|
||||
length += a.byteLength();
|
||||
return length;
|
||||
}
|
||||
|
||||
public final Attribute[] attrs;
|
||||
public final Map<String, Attribute> map;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue