6866657: add byteLength method to primary classfile types

Reviewed-by: mchung
This commit is contained in:
Jonathan Gibbons 2009-07-30 07:48:24 -07:00
parent 638db1aabb
commit 219445d03a
8 changed files with 197 additions and 0 deletions

View file

@ -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;
}