/** {@inheritDoc} */ @Override public final int byteLength() { return 8 + localVariables.size() * 10; }
/** {@inheritDoc} */ @Override public final int byteLength() { return 8 + localVariables.size() * 10; }
/** {@inheritDoc} */ public final int byteLength() { return 8 + localVariables.size() * 10; }
/** {@inheritDoc} */ public final int byteLength() { return 8 + localVariables.size() * 10; }
/** {@inheritDoc} */ public final int byteLength() { return 8 + localVariables.size() * 10; }
/** {@inheritDoc} */ public final int byteLength() { return 8 + localVariables.size() * 10; }
/** * Gets the local variable information in this instance which matches * the given {@link com.android.dx.cf.code.LocalVariableList.Item} * in all respects but the type descriptor and signature, if any. * * @param item {@code non-null;} local variable information to match * @return {@code null-ok;} the corresponding local variable information stored * in this instance, or {@code null} if there is no matching * information */ public Item itemToLocal(Item item) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesAllButType(item)) { return one; } } return null; }
/** * Gets the local variable information in this instance which matches * the given {@link com.android.dx.cf.code.LocalVariableList.Item} * in all respects but the type descriptor and signature, if any. * * @param item {@code non-null;} local variable information to match * @return {@code null-ok;} the corresponding local variable information stored * in this instance, or {@code null} if there is no matching * information */ public Item itemToLocal(Item item) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesAllButType(item)) { return one; } } return null; }
/** * Gets the local variable information associated with a given address * and local index, if any. <b>Note:</b> In standard classfiles, a * variable's start point is listed as the address of the instruction * <i>just past</i> the one that sets the variable. * * @param pc {@code >= 0;} the address to look up * @param index {@code >= 0;} the local variable index * @return {@code null-ok;} the associated local variable information, or * {@code null} if none is known */ public Item pcAndIndexToLocal(int pc, int index) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesPcAndIndex(pc, index)) { return one; } } return null; }
/** * Gets the local variable information in this instance which matches * the given {@link com.android.dx.cf.code.LocalVariableList.Item} * in all respects but the type descriptor and signature, if any. * * @param item {@code non-null;} local variable information to match * @return {@code null-ok;} the corresponding local variable information stored * in this instance, or {@code null} if there is no matching * information */ public Item itemToLocal(Item item) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesAllButType(item)) { return one; } } return null; }
/** * Gets the local variable information in this instance which matches * the given {@link com.android.dx.cf.code.LocalVariableList.Item} * in all respects but the type descriptor and signature, if any. * * @param item {@code non-null;} local variable information to match * @return {@code null-ok;} the corresponding local variable information stored * in this instance, or {@code null} if there is no matching * information */ public Item itemToLocal(Item item) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesAllButType(item)) { return one; } } return null; }
/** * Gets the local variable information associated with a given address * and local index, if any. <b>Note:</b> In standard classfiles, a * variable's start point is listed as the address of the instruction * <i>just past</i> the one that sets the variable. * * @param pc {@code >= 0;} the address to look up * @param index {@code >= 0;} the local variable index * @return {@code null-ok;} the associated local variable information, or * {@code null} if none is known */ public Item pcAndIndexToLocal(int pc, int index) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesPcAndIndex(pc, index)) { return one; } } return null; }
/** * Gets the local variable information in this instance which matches * the given {@link com.android.dx.cf.code.LocalVariableList.Item} * in all respects but the type descriptor and signature, if any. * * @param item {@code non-null;} local variable information to match * @return {@code null-ok;} the corresponding local variable information stored * in this instance, or {@code null} if there is no matching * information */ public Item itemToLocal(Item item) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesAllButType(item)) { return one; } } return null; }
/** * Gets the local variable information associated with a given address * and local index, if any. <b>Note:</b> In standard classfiles, a * variable's start point is listed as the address of the instruction * <i>just past</i> the one that sets the variable. * * @param pc {@code >= 0;} the address to look up * @param index {@code >= 0;} the local variable index * @return {@code null-ok;} the associated local variable information, or * {@code null} if none is known */ public Item pcAndIndexToLocal(int pc, int index) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesPcAndIndex(pc, index)) { return one; } } return null; }
/** * Gets the local variable information associated with a given address * and local index, if any. <b>Note:</b> In standard classfiles, a * variable's start point is listed as the address of the instruction * <i>just past</i> the one that sets the variable. * * @param pc {@code >= 0;} the address to look up * @param index {@code >= 0;} the local variable index * @return {@code null-ok;} the associated local variable information, or * {@code null} if none is known */ public Item pcAndIndexToLocal(int pc, int index) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesPcAndIndex(pc, index)) { return one; } } return null; }
/** * Gets the local variable information in this instance which matches * the given {@link com.android.dx.cf.code.LocalVariableList.Item} * in all respects but the type descriptor and signature, if any. * * @param item {@code non-null;} local variable information to match * @return {@code null-ok;} the corresponding local variable information stored * in this instance, or {@code null} if there is no matching * information */ public Item itemToLocal(Item item) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesAllButType(item)) { return one; } } return null; }
/** * Gets the local variable information associated with a given address * and local index, if any. <b>Note:</b> In standard classfiles, a * variable's start point is listed as the address of the instruction * <i>just past</i> the one that sets the variable. * * @param pc {@code >= 0;} the address to look up * @param index {@code >= 0;} the local variable index * @return {@code null-ok;} the associated local variable information, or * {@code null} if none is known */ public Item pcAndIndexToLocal(int pc, int index) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesPcAndIndex(pc, index)) { return one; } } return null; }
/** * Gets the local variable information associated with a given address * and local index, if any. <b>Note:</b> In standard classfiles, a * variable's start point is listed as the address of the instruction * <i>just past</i> the one that sets the variable. * * @param pc {@code >= 0;} the address to look up * @param index {@code >= 0;} the local variable index * @return {@code null-ok;} the associated local variable information, or * {@code null} if none is known */ public Item pcAndIndexToLocal(int pc, int index) { int sz = size(); for (int i = 0; i < sz; i++) { Item one = (Item) get0(i); if ((one != null) && one.matchesPcAndIndex(pc, index)) { return one; } } return null; }
/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } result.setImmutable(); return result; }
/** * Returns an instance which is the concatenation of the two given * instances. The result is immutable. * * @param list1 {@code non-null;} first instance * @param list2 {@code non-null;} second instance * @return {@code non-null;} combined instance */ public static LocalVariableList concat(LocalVariableList list1, LocalVariableList list2) { if (list1 == EMPTY) { // easy case return list2; } int sz1 = list1.size(); int sz2 = list2.size(); LocalVariableList result = new LocalVariableList(sz1 + sz2); for (int i = 0; i < sz1; i++) { result.set(i, list1.get(i)); } for (int i = 0; i < sz2; i++) { result.set(sz1 + i, list2.get(i)); } result.setImmutable(); return result; }