Package com.android.dx.rop.type
Class StdTypeList
java.lang.Object
com.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.rop.type.StdTypeList
Standard implementation of
TypeList
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final StdTypeList
non-null;
the list[boolean[], int]
static final StdTypeList
non-null;
the list[byte[], int]
static final StdTypeList
non-null;
the list[char[], int]
static final StdTypeList
non-null;
the list[double]
static final StdTypeList
non-null;
the list[double, double]
static final StdTypeList
non-null;
the list[double, double[], int]
static final StdTypeList
non-null;
the list[double, Object]
static final StdTypeList
non-null;
the list[double[], int]
static final StdTypeList
non-null;
no-element instancestatic final StdTypeList
non-null;
the list[float]
static final StdTypeList
non-null;
the list[float, float]
static final StdTypeList
non-null;
the list[float, float[], int]
static final StdTypeList
non-null;
the list[float, Object]
static final StdTypeList
non-null;
the list[float[], int]
static final StdTypeList
non-null;
the list[int]
static final StdTypeList
non-null;
the list[int, boolean[], int]
static final StdTypeList
non-null;
the list[int, byte[], int]
static final StdTypeList
non-null;
the list[int, char[], int]
static final StdTypeList
non-null;
the list[int, int]
static final StdTypeList
non-null;
the list[int, int[], int]
static final StdTypeList
non-null;
the list[int, Object]
static final StdTypeList
non-null;
the list[int, short[], int]
static final StdTypeList
non-null;
the list[int[], int]
static final StdTypeList
non-null;
the list[long]
static final StdTypeList
non-null;
the list[long, int]
static final StdTypeList
non-null;
the list[long, long]
static final StdTypeList
non-null;
the list[long, long[], int]
static final StdTypeList
non-null;
the list[long, Object]
static final StdTypeList
non-null;
the list[long[], int]
static final StdTypeList
non-null;
the list[Object]
static final StdTypeList
non-null;
the list[Object, Object]
static final StdTypeList
non-null;
the list[Object, Object[], int]
static final StdTypeList
non-null;
the list[Object[], int]
static final StdTypeList
non-null;
the list[ReturnAddress]
static final StdTypeList
non-null;
the list[short[], int]
static final StdTypeList
non-null;
the list[Throwable]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compareContents
(TypeList list1, TypeList list2) Compares the contents of the given two instances for ordering.static boolean
equalContents
(TypeList list1, TypeList list2) Compares the contents of the given two instances for equality.get
(int n) Gets the indicated element.getType
(int n) Gets the indicated element.int
Gets the number of 32-bit words required to hold instances of all the elements of this list.static int
hashContents
(TypeList list) Returns a hashcode of the contents of the given list.static StdTypeList
Makes a single-element instance.static StdTypeList
Makes a two-element instance.static StdTypeList
Makes a three-element instance.static StdTypeList
Makes a four-element instance.void
Sets the type at the given index.static String
Returns the given list as a comma-separated list of human forms.withAddedType
(Type type) Returns a new instance which is identical to this one, except that the given item is appended to the end and it is guaranteed to be immutable.Returns a new instance, which is the same as this instance, except that it has an additional type prepended to the original.Methods inherited from class com.android.dx.util.FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toString
Methods inherited from class com.android.dx.util.MutabilityControl
isImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutable
-
Field Details
-
EMPTY
non-null;
no-element instance -
INT
non-null;
the list[int]
-
LONG
non-null;
the list[long]
-
FLOAT
non-null;
the list[float]
-
DOUBLE
non-null;
the list[double]
-
OBJECT
non-null;
the list[Object]
-
RETURN_ADDRESS
non-null;
the list[ReturnAddress]
-
THROWABLE
non-null;
the list[Throwable]
-
INT_INT
non-null;
the list[int, int]
-
LONG_LONG
non-null;
the list[long, long]
-
FLOAT_FLOAT
non-null;
the list[float, float]
-
DOUBLE_DOUBLE
non-null;
the list[double, double]
-
OBJECT_OBJECT
non-null;
the list[Object, Object]
-
INT_OBJECT
non-null;
the list[int, Object]
-
LONG_OBJECT
non-null;
the list[long, Object]
-
FLOAT_OBJECT
non-null;
the list[float, Object]
-
DOUBLE_OBJECT
non-null;
the list[double, Object]
-
LONG_INT
non-null;
the list[long, int]
-
INTARR_INT
non-null;
the list[int[], int]
-
LONGARR_INT
non-null;
the list[long[], int]
-
FLOATARR_INT
non-null;
the list[float[], int]
-
DOUBLEARR_INT
non-null;
the list[double[], int]
-
OBJECTARR_INT
non-null;
the list[Object[], int]
-
BOOLEANARR_INT
non-null;
the list[boolean[], int]
-
BYTEARR_INT
non-null;
the list[byte[], int]
-
CHARARR_INT
non-null;
the list[char[], int]
-
SHORTARR_INT
non-null;
the list[short[], int]
-
INT_INTARR_INT
non-null;
the list[int, int[], int]
-
LONG_LONGARR_INT
non-null;
the list[long, long[], int]
-
FLOAT_FLOATARR_INT
non-null;
the list[float, float[], int]
-
DOUBLE_DOUBLEARR_INT
non-null;
the list[double, double[], int]
-
OBJECT_OBJECTARR_INT
non-null;
the list[Object, Object[], int]
-
INT_BOOLEANARR_INT
non-null;
the list[int, boolean[], int]
-
INT_BYTEARR_INT
non-null;
the list[int, byte[], int]
-
INT_CHARARR_INT
non-null;
the list[int, char[], int]
-
INT_SHORTARR_INT
non-null;
the list[int, short[], int]
-
-
Constructor Details
-
StdTypeList
public StdTypeList(int size) Constructs an instance. All indices initially containnull
.- Parameters:
size
- the size of the list
-
-
Method Details
-
make
Makes a single-element instance.- Parameters:
type
-non-null;
the element- Returns:
non-null;
an appropriately-constructed instance
-
make
Makes a two-element instance.- Parameters:
type0
-non-null;
the first elementtype1
-non-null;
the second element- Returns:
non-null;
an appropriately-constructed instance
-
make
Makes a three-element instance.- Parameters:
type0
-non-null;
the first elementtype1
-non-null;
the second elementtype2
-non-null;
the third element- Returns:
non-null;
an appropriately-constructed instance
-
make
Makes a four-element instance.- Parameters:
type0
-non-null;
the first elementtype1
-non-null;
the second elementtype2
-non-null;
the third elementtype3
-non-null;
the fourth element- Returns:
non-null;
an appropriately-constructed instance
-
toHuman
Returns the given list as a comma-separated list of human forms. This is a static method so as to work on arbitraryTypeList
instances.- Parameters:
list
-non-null;
the list to convert- Returns:
non-null;
the human form
-
hashContents
Returns a hashcode of the contents of the given list. This is a static method so as to work on arbitraryTypeList
instances.- Parameters:
list
-non-null;
the list to inspect- Returns:
non-null;
the hash code
-
equalContents
Compares the contents of the given two instances for equality. This is a static method so as to work on arbitraryTypeList
instances.- Parameters:
list1
-non-null;
one list to comparelist2
-non-null;
another list to compare- Returns:
- whether the two lists contain corresponding equal elements
-
compareContents
Compares the contents of the given two instances for ordering. This is a static method so as to work on arbitraryTypeList
instances.- Parameters:
list1
-non-null;
one list to comparelist2
-non-null;
another list to compare- Returns:
- the order of the two lists
-
getType
Gets the indicated element. It is an error to call this with the index for an element which was never set; if you do that, this will throwNullPointerException
. -
getWordCount
public int getWordCount()Gets the number of 32-bit words required to hold instances of all the elements of this list. This is a sum of the widths (categories) of all the elements.- Specified by:
getWordCount
in interfaceTypeList
- Returns:
>= 0;
the required number of words
-
withAddedType
Returns a new instance which is identical to this one, except that the given item is appended to the end and it is guaranteed to be immutable.- Specified by:
withAddedType
in interfaceTypeList
- Parameters:
type
-non-null;
item to append- Returns:
non-null;
an appropriately-constructed instance
-
get
Gets the indicated element. It is an error to call this with the index for an element which was never set; if you do that, this will throwNullPointerException
.- Parameters:
n
->= 0, < size();
which element- Returns:
non-null;
the indicated element
-
set
Sets the type at the given index.- Parameters:
n
->= 0, < size();
which elementtype
-non-null;
the type to store
-
withFirst
Returns a new instance, which is the same as this instance, except that it has an additional type prepended to the original.- Parameters:
type
-non-null;
the new first element- Returns:
non-null;
an appropriately-constructed instance
-