Package com.android.dx.dex.code
Class DalvCode
java.lang.Object
com.android.dx.dex.code.DalvCode
Container for all the pieces of a concrete method. Each instance
corresponds to a
code
structure in a .dex
file.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Class used as a callback forassignIndices(com.android.dx.dex.code.DalvCode.AssignIndicesCallback)
. -
Constructor Summary
ConstructorDescriptionDalvCode
(int positionInfo, OutputFinisher unprocessedInsns, CatchBuilder unprocessedCatches) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignIndices
(DalvCode.AssignIndicesCallback callback) Assign indices in all instructions that need them, using the given callback to perform lookups.Gets the catch (exception handler) table.Gets the set of catch types handled anywhere in the code.Gets the set of all constants referred to by instructions in the code.getInsns()
Gets the list of instructions.Gets the source positions list.Gets the source positions list.boolean
Gets whether this instance has any catches at all (either typed or catch-all).boolean
Gets whether this instance has any local variable data to represent.boolean
Gets whether this instance has any position data to represent.
-
Constructor Details
-
DalvCode
Constructs an instance.- Parameters:
positionInfo
- how much position info to preserve; one of the static constants inPositionList
unprocessedInsns
-non-null;
the instruction list, ready for final processingunprocessedCatches
-non-null;
unprocessed catch (exception handler) table
-
-
Method Details
-
assignIndices
Assign indices in all instructions that need them, using the given callback to perform lookups. This must be called beforegetInsns()
.- Parameters:
callback
-non-null;
callback object
-
hasPositions
public boolean hasPositions()Gets whether this instance has any position data to represent.- Returns:
true
iff this instance has any position data to represent
-
hasLocals
public boolean hasLocals()Gets whether this instance has any local variable data to represent.- Returns:
true
iff this instance has any local variable data to represent
-
hasAnyCatches
public boolean hasAnyCatches()Gets whether this instance has any catches at all (either typed or catch-all).- Returns:
- whether this instance has any catches at all
-
getCatchTypes
Gets the set of catch types handled anywhere in the code.- Returns:
non-null;
the set of catch types
-
getInsnConstants
Gets the set of all constants referred to by instructions in the code.- Returns:
non-null;
the set of constants
-
getInsns
Gets the list of instructions.- Returns:
non-null;
the instruction list
-
getCatches
Gets the catch (exception handler) table.- Returns:
non-null;
the catch table
-
getPositions
Gets the source positions list.- Returns:
non-null;
the source positions list
-
getLocals
Gets the source positions list.- Returns:
non-null;
the source positions list
-