Lines Matching refs:offset

23  * An item in a Dalvik file which is referenced by absolute offset.
41 * {@code >= -1;} assigned offset of the item from the start of its section,
44 private int offset;
47 * Gets the absolute offset of the given item, returning {@code 0}
51 * @return {@code >= 0;} the item's absolute offset, or {@code 0}
63 * Constructs an instance. The offset is initially unassigned.
80 this.offset = -1;
182 * Gets the relative item offset. The offset is from the start of
185 * @return {@code >= 0;} the offset
186 * @throws RuntimeException thrown if the offset is not yet known
189 if (offset < 0) {
190 throw new RuntimeException("offset not yet known");
193 return offset;
197 * Gets the absolute item offset. The offset is from the start of
200 * @return {@code >= 0;} the offset
201 * @throws RuntimeException thrown if the offset is not yet known
204 if (offset < 0) {
205 throw new RuntimeException("offset not yet known");
208 return addedTo.getAbsoluteOffset(offset);
213 * the given offset. It is only valid to call this method once per
218 * @param offset {@code >= 0;} the desired offset from the start of the
220 * @return {@code >= 0;} the offset that this instance should be placed at
223 public final int place(Section addedTo, int offset) {
228 if (offset < 0) {
229 throw new IllegalArgumentException("offset < 0");
237 offset = (offset + mask) & ~mask;
240 this.offset = offset;
242 place0(addedTo, offset);
244 return offset;
258 * Gets the absolute offset of this item as a string, suitable for
261 * @return {@code non-null;} the offset string
298 * @param offset {@code >= 0;} the offset from the start of the
301 protected void place0(Section addedTo, int offset) {