core: don't hardcode attributes count

This commit is contained in:
Skylot
2015-02-21 17:01:04 +03:00
parent f7303881aa
commit ec3b71e5b6
2 changed files with 2 additions and 7 deletions
@@ -22,17 +22,12 @@ import jadx.core.dex.trycatch.SplitterBlockAttr;
/**
* Attribute types enumeration,
* uses generic type for omit cast after in 'AttributeStorage.get' method
* uses generic type for omit cast after 'AttributeStorage.get' method
*
* @param <T> attribute class implementation
*/
public class AType<T extends IAttribute> {
private AType() {
}
public static final int FIELDS_COUNT = 18;
public static final AType<AttrList<JumpInfo>> JUMP = new AType<AttrList<JumpInfo>>();
public static final AType<AttrList<LoopInfo>> LOOP = new AType<AttrList<LoopInfo>>();
@@ -24,7 +24,7 @@ public class AttributeStorage {
public AttributeStorage() {
flags = EnumSet.noneOf(AFlag.class);
attributes = new IdentityHashMap<AType<?>, IAttribute>(AType.FIELDS_COUNT);
attributes = new IdentityHashMap<AType<?>, IAttribute>();
}
public void add(AFlag flag) {