Class AndroidEntryPoint.ExecutionOrder
- All Implemented Interfaces:
AndroidEntryPoint.IExecutionOrder
,Comparable<AndroidEntryPoint.IExecutionOrder>
- Enclosing class:
AndroidEntryPoint
The order has to be understood inclusive! E.g. "after(END_OF_LOOP)" means that the position is __BEFORE__ the loop is actually closed!
Before building the model a list of AdroidEntryPoints is to be sorted by that criterion. You can use AndroidEntryPoint.ExecutionOrderComperator for that task.
- Since:
- 2013-09-01
- Author:
- Tobias Blaschke <code@toiasblaschke.de>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AndroidEntryPoint.ExecutionOrder
Basicly the same as AT_LAST but visited beforestatic final AndroidEntryPoint.ExecutionOrder
Visit the EntryPoint once at the beginning of the model use that for initialization stuffstatic final AndroidEntryPoint.ExecutionOrder
Last calls in the modelstatic final AndroidEntryPoint.ExecutionOrder
Basicly the same as AT_FIRST but visited after AT_FIRSTstatic final AndroidEntryPoint.ExecutionOrder
This value getts used by the detection heuristic - It is not recommended for manual use.static final AndroidEntryPoint.ExecutionOrder
Things in END_OF_LOOP are acutually part of the loop.static final AndroidEntryPoint.ExecutionOrder
Basicly the same as START_OF_LOOPstatic final AndroidEntryPoint.ExecutionOrder
Do multiple calls in the loop.static final AndroidEntryPoint.ExecutionOrder
Visit multiple times (endless) in the loop -
Constructor Summary
ConstructorDescriptionExecutionOrder
(int val) Unrecommended way to generate the Order based on an Integer.ExecutionOrder
(String label) Unrecommended way to generate the Order based on a Label-String. -
Method Summary
Modifier and TypeMethodDescriptionafter
(int after) Preferafter(com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder)
whenever possible.Place the call in the same section after the given call or "label".after
(AndroidEntryPoint.IExecutionOrder[] after) Use this variant to refer to multiple locations.between
(AndroidEntryPoint.IExecutionOrder[] after, AndroidEntryPoint.IExecutionOrder before) between
(AndroidEntryPoint.IExecutionOrder[] after, AndroidEntryPoint.IExecutionOrder[] before) Use this variant to refer to multiple locations.Use this to place a call to an EntryPoint between two other EntryPoint calls or ExecutionOrder "labels".between
(AndroidEntryPoint.IExecutionOrder after, AndroidEntryPoint.IExecutionOrder[] before) int
int
Returns an integer-representation of the ExecutionOrder.AbstractAndroidModel inserts code at section switches.toString()
-
Field Details
-
AT_FIRST
Visit the EntryPoint once at the beginning of the model use that for initialization stuff -
BEFORE_LOOP
Basicly the same as AT_FIRST but visited after AT_FIRST -
START_OF_LOOP
Visit multiple times (endless) in the loop -
MIDDLE_OF_LOOP
Basicly the same as START_OF_LOOP -
MULTIPLE_TIMES_IN_LOOP
Do multiple calls in the loop. Visited after MIDDLE_OF_LOOP, before EEN_OF_LOOP -
END_OF_LOOP
Things in END_OF_LOOP are acutually part of the loop. Use AFTER_LOOP if you want them executed only once -
AFTER_LOOP
Basicly the same as AT_LAST but visited before -
AT_LAST
Last calls in the model -
DEFAULT
This value getts used by the detection heuristic - It is not recommended for manual use.
-
-
Constructor Details
-
ExecutionOrder
public ExecutionOrder(int val) Unrecommended way to generate the Order based on an Integer.This method is handy when reading back files. In your code you should prefer the methods
after(com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder)
andbetween(com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder, com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder)
. -
ExecutionOrder
Unrecommended way to generate the Order based on a Label-String.This method is handy when reading back files. If you want to refer to a label you should prefer the static members.
-
-
Method Details
-
getOrderValue
public int getOrderValue()Description copied from interface:AndroidEntryPoint.IExecutionOrder
Returns an integer-representation of the ExecutionOrder.- Specified by:
getOrderValue
in interfaceAndroidEntryPoint.IExecutionOrder
-
between
public static AndroidEntryPoint.ExecutionOrder between(AndroidEntryPoint.IExecutionOrder after, AndroidEntryPoint.IExecutionOrder before) Use this to place a call to an EntryPoint between two other EntryPoint calls or ExecutionOrder "labels". between() does not care about section-boundaries by itself!Use
between(com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder[], com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder[])
and use labels as additional placement-information to prevent unexpected misplacement.- Parameters:
after
- the call or "label" to be executed before this onebefore
- the call or "label" to be executed after this one (inclusive)- Returns:
- A sortable object to represent the execution order
- Throws:
ArithmeticException
- when the precision is no more suitable for further cascadingIllegalArgumentException
- if parameter after is larger than before.NullPointerException
- if either parameter is null
-
between
public static AndroidEntryPoint.ExecutionOrder between(AndroidEntryPoint.IExecutionOrder[] after, AndroidEntryPoint.IExecutionOrder[] before) Use this variant to refer to multiple locations.The minimum / maximum is computed before the placement of the ExecutionOrder.
This method is intended to be more robust when changing the position-information of referred-to ExecutionOrders.
In any other means it behaves exactly like
between(com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder, com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder)
.- Parameters:
after
- the calls or "labels" to be executed before this onebefore
- the calls or "labels" to be executed after this one (inclusive)- Returns:
- A sortable object to represent the execution order
- Throws:
ArithmeticException
- when the precision is no more suitable for further cascadingIllegalArgumentException
- if parameter after is larger than before.NullPointerException
- if either parameter is null
-
between
public static AndroidEntryPoint.ExecutionOrder between(AndroidEntryPoint.IExecutionOrder after, AndroidEntryPoint.IExecutionOrder[] before) -
between
public static AndroidEntryPoint.ExecutionOrder between(AndroidEntryPoint.IExecutionOrder[] after, AndroidEntryPoint.IExecutionOrder before) -
after
Place the call in the same section after the given call or "label".- Parameters:
after
- the call to be executed before this one or label the call belongs to- Returns:
- A sortable object to represent the execution order
- Throws:
ArithmeticException
- when the precision is no more suitable for further cascadingNullPointerException
- if the parameter is null
-
after
Preferafter(com.ibm.wala.dalvik.ipa.callgraph.impl.AndroidEntryPoint.IExecutionOrder)
whenever possible. -
after
Use this variant to refer to multiple locations.The maximum is computed before the placement of the ExecutionOrder.
- Parameters:
after
- the call to be executed before this one or label the call belongs to- Returns:
- A sortable object to represent the execution order
- Throws:
ArithmeticException
- when the precision is no more suitable for further cascadingNullPointerException
- if the parameter is null
-
directlyBefore
public static AndroidEntryPoint.ExecutionOrder directlyBefore(AndroidEntryPoint.IExecutionOrder before) -
directlyAfter
public static AndroidEntryPoint.ExecutionOrder directlyAfter(AndroidEntryPoint.IExecutionOrder before) -
getSection
Description copied from interface:AndroidEntryPoint.IExecutionOrder
AbstractAndroidModel inserts code at section switches.There are eight hardcoded sections. Sections are derived by rounding the integer-representation.
- Specified by:
getSection
in interfaceAndroidEntryPoint.IExecutionOrder
- Returns:
- the section of this entity
-
compareTo
- Specified by:
compareTo
in interfaceComparable<AndroidEntryPoint.IExecutionOrder>
-
toString
-