Change TypeListItem constructor to take an array rather than a list, to be consistent with other classes

git-svn-id: https://smali.googlecode.com/svn/trunk@408 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-08-23 07:11:42 +00:00
parent 11503ec26e
commit ea64b6e653

View File

@ -52,11 +52,10 @@ public class TypeListItem extends Item<TypeListItem> {
* @param dexFile The <code>DexFile</code> that this item belongs to * @param dexFile The <code>DexFile</code> that this item belongs to
* @param typeList A list of the types that this <code>TypeListItem</code> represents * @param typeList A list of the types that this <code>TypeListItem</code> represents
*/ */
private TypeListItem(DexFile dexFile, List<TypeIdItem> typeList) { private TypeListItem(DexFile dexFile, TypeIdItem[] typeList) {
super(dexFile); super(dexFile);
this.typeList = new TypeIdItem[typeList.size()]; this.typeList = typeList;
typeList.toArray(this.typeList);
} }
/** /**
@ -67,7 +66,7 @@ public class TypeListItem extends Item<TypeListItem> {
* @return a <code>TypeListItem</code> for the given values, and that has been interned into * @return a <code>TypeListItem</code> for the given values, and that has been interned into
* the given <code>DexFile</code> * the given <code>DexFile</code>
*/ */
public static TypeListItem getInternedTypeListItem(DexFile dexFile, List<TypeIdItem> typeList) { public static TypeListItem getInternedTypeListItem(DexFile dexFile, TypeIdItem[] typeList) {
TypeListItem typeListItem = new TypeListItem(dexFile, typeList); TypeListItem typeListItem = new TypeListItem(dexFile, typeList);
return dexFile.TypeListsSection.intern(typeListItem); return dexFile.TypeListsSection.intern(typeListItem);
} }