FileDocCategorySizeDatePackage
BaseCodeCursor.javaAPI DocAndroid 5.1 API1669Thu Mar 12 22:18:30 GMT 2015com.android.dx.io.instructions

BaseCodeCursor

public abstract class BaseCodeCursor extends Object implements CodeCursor
Base implementation of {@link CodeCursor}.

Fields Summary
private final AddressMap
baseAddressMap
base address map
private int
cursor
next index within {@link #array} to read from or write to
Constructors Summary
public BaseCodeCursor()
Constructs an instance.

        this.baseAddressMap = new AddressMap();
        this.cursor = 0;
    
Methods Summary
protected final voidadvance(int amount)
Advance the cursor by the indicated amount.

        cursor += amount;
    
public final intbaseAddressForCursor()

inheritDoc

        int mapped = baseAddressMap.get(cursor);
        return (mapped >= 0) ? mapped : cursor;
    
public final intcursor()

inheritDoc

        return cursor;
    
public final voidsetBaseAddress(int targetAddress, int baseAddress)

inheritDoc

        baseAddressMap.put(targetAddress, baseAddress);