Class SingleStartAndroidModel
- Direct Known Subclasses:
LoopAndroidModel
This class models a single run of an Android-Component: E.g. The view of an Activity gets shown only once.
The incorporated loop is wrapped around user-interaction methods. These are in the section MULTIPLE_TIMES_IN_LOOP.
- Author:
- Tobias Blaschke <code@tobiasblaschke.de>
- See Also:
-
Field Summary
Fields inherited from class AbstractAndroidModel
body, entryPoints, insts, paramManagerModifier and TypeFieldDescriptionprotected VolatileMethodSummaryprotected Iterable<? extends Entrypoint> protected TypeSafeInstructionFactoryprotected SSAValueManager -
Constructor Summary
ConstructorsConstructorDescriptionSingleStartAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints) -
Method Summary
Modifier and TypeMethodDescriptionprotected intenterEND_OF_LOOP(int PC) Loops to MULTIPLE_TIMES_IN_LOOP.protected intenterMULTIPLE_TIMES_IN_LOOP(int PC) Prepares the PC to get looped to.Methods inherited from class AbstractAndroidModel
enter, enterAFTER_LOOP, enterAT_FIRST, enterAT_LAST, enterBEFORE_LOOP, enterMIDDLE_OF_LOOP, enterSTART_OF_LOOP, finish, hadSectionSwitch, leaveAT_LAST, returnTypesBetweenModifier and TypeMethodDescriptionintenter(AndroidEntryPoint.ExecutionOrder section, int PC) Dispatches to the enterLABEL-functions.protected intenterAFTER_LOOP(int PC) Gets called when Label ExecutionOrder.AFTER_LOOP got stepped over.protected intenterAT_FIRST(int PC) Gets called when Label ExecutionOrder.AT_FIRST got stepped over.protected intenterAT_LAST(int PC) Gets called when Label ExecutionOrder.AT_LAST got stepped over.protected intenterBEFORE_LOOP(int PC) Gets called when Label ExecutionOrder.BEFORE_LOOP got stepped over.protected intenterMIDDLE_OF_LOOP(int PC) Gets called when Label ExecutionOrder.MIDDLE_OF_LOOP got stepped over.protected intenterSTART_OF_LOOP(int PC) Gets called when Label ExecutionOrder.START_OF_LOOP got stepped over.intfinish(int PC) Calls all remaining enterLABEL-functions, finally calls leaveAT_LAST.final booleanDetermines for an AndroidEntryPoint if a label got skipped over.protected intleaveAT_LAST(int PC) Gets called when the model gets finished.protected List<TypeReference> Return a List of all Types returned by functions between start (inclusive) and end (exclusive).
-
Constructor Details
-
SingleStartAndroidModel
public SingleStartAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints) - Parameters:
body- The MethodSummary to add instructions toinsts- Will be used to generate the instructions
-
-
Method Details
-
enterMULTIPLE_TIMES_IN_LOOP
protected int enterMULTIPLE_TIMES_IN_LOOP(int PC) Prepares the PC to get looped to.Thus it tries to assure a new basic block starts here. Additionally it reserves some space for the insertion of Phi-Functions.
Gets called when Label ExecutionOrder.MULTIPLE_TIMES_IN_LOOP got stepped over.
In most cases you don't want to invoke this function directly but to use
enter(ExecutionOrder.MULTIPLE_TIMES_IN_LOOP, int)insteadSide effects: currentSection is updated, instructions are inserted into the body
- Overrides:
enterMULTIPLE_TIMES_IN_LOOPin classAbstractAndroidModel- Parameters:
PC- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-
enterEND_OF_LOOP
protected int enterEND_OF_LOOP(int PC) Loops to MULTIPLE_TIMES_IN_LOOP.It inserts a gotoInstruction and fills the space reserved before with actual PhiInstructions
Gets called when Label ExecutionOrder.END_OF_LOOP got stepped over.
In most cases you don't want to invoke this function directly but to use
enter(ExecutionOrder.END_OF_LOOP, int)insteadSide effects: currentSection is updated, instructions are inserted into the body
- Overrides:
enterEND_OF_LOOPin classAbstractAndroidModel- Parameters:
PC- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-