core: don't hardcode attributes count
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user