Fields Summary |
---|
private final int | positionInfohow much position info to preserve; one of the static
constants in {@link PositionList} |
private OutputFinisher | unprocessedInsns{@code null-ok;} the instruction list, ready for final processing;
nulled out in {@link #finishProcessingIfNecessary} |
private CatchBuilder | unprocessedCatches{@code non-null;} unprocessed catch table;
nulled out in {@link #finishProcessingIfNecessary} |
private CatchTable | catches{@code null-ok;} catch table; set in
{@link #finishProcessingIfNecessary} |
private PositionList | positions{@code null-ok;} source positions list; set in
{@link #finishProcessingIfNecessary} |
private LocalList | locals{@code null-ok;} local variable list; set in
{@link #finishProcessingIfNecessary} |
private DalvInsnList | insns{@code null-ok;} the processed instruction list; set in
{@link #finishProcessingIfNecessary} |
Methods Summary |
---|
public void | assignIndices(com.android.dexgen.dex.code.DalvCode$AssignIndicesCallback callback)Assign indices in all instructions that need them, using the
given callback to perform lookups. This must be called before
{@link #getInsns}.
unprocessedInsns.assignIndices(callback);
|
private void | finishProcessingIfNecessary()Finish up processing of the method.
if (insns != null) {
return;
}
insns = unprocessedInsns.finishProcessingAndGetList();
positions = PositionList.make(insns, positionInfo);
locals = LocalList.make(insns);
catches = unprocessedCatches.build();
// Let them be gc'ed.
unprocessedInsns = null;
unprocessedCatches = null;
|
public java.util.HashSet | getCatchTypes()Gets the set of catch types handled anywhere in the code.
return unprocessedCatches.getCatchTypes();
|
public CatchTable | getCatches()Gets the catch (exception handler) table.
finishProcessingIfNecessary();
return catches;
|
public java.util.HashSet | getInsnConstants()Gets the set of all constants referred to by instructions in
the code.
return unprocessedInsns.getAllConstants();
|
public DalvInsnList | getInsns()Gets the list of instructions.
finishProcessingIfNecessary();
return insns;
|
public LocalList | getLocals()Gets the source positions list.
finishProcessingIfNecessary();
return locals;
|
public PositionList | getPositions()Gets the source positions list.
finishProcessingIfNecessary();
return positions;
|
public boolean | hasAnyCatches()Gets whether this instance has any catches at all (either typed
or catch-all).
return unprocessedCatches.hasAnyCatches();
|
public boolean | hasLocals()Gets whether this instance has any local variable data to represent.
return unprocessedInsns.hasAnyLocalInfo();
|
public boolean | hasPositions()Gets whether this instance has any position data to represent.
return (positionInfo != PositionList.NONE)
&& unprocessedInsns.hasAnyPositionInfo();
|