Class InstructionTypeCounter
java.lang.Object
com.ibm.wala.shrike.shrikeBT.info.InstructionTypeCounter
- All Implemented Interfaces:
MethodData.Results
This method annotation counts the number of instructions of each type (according to each
Instruction subclass).
The get...Count methods are the only methods needed by clients. These methods check to see if the MethodData object already has an InstructionTypeCounter annotation before recomputing the counts and returning the desired count.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
static int
getArrayLoadCount
(MethodData info) static int
getArrayStoreCount
(MethodData info) static int
getBinaryOpCount
(MethodData info) static int
getCheckCastCount
(MethodData info) static int
getComparisonCount
(MethodData info) static int
static int
getConstantCount
(MethodData info) static int
getConversionCount
(MethodData info) static int
getDupCount
(MethodData info) static int
getGetCount
(MethodData info) static int
getGotoCount
(MethodData info) static int
getInstanceOfCount
(MethodData info) static int
getInvokeCount
(MethodData info) static int
getLocalLoadCount
(MethodData info) static int
getLocalStoreCount
(MethodData info) static int
getMonitorCount
(MethodData info) static int
getNewCount
(MethodData info) static int
getPopCount
(MethodData info) static int
getPutCount
(MethodData info) static int
getReturnCount
(MethodData info) static int
getShiftCount
(MethodData info) static int
getSwapCount
(MethodData info) static int
getSwitchesCount
(MethodData info) static int
getThrowCount
(MethodData info) static int
getUnaryOpCount
(MethodData info) boolean
notifyUpdate
(MethodData info, IInstruction[] newInstructions, ExceptionHandler[][] newHandlers, int[] newInstructionMap) Whenever the underlying method is updated, we'll throw away our counts so they can be reconstructed from scratch next time.
-
Method Details
-
notifyUpdate
public boolean notifyUpdate(MethodData info, IInstruction[] newInstructions, ExceptionHandler[][] newHandlers, int[] newInstructionMap) Whenever the underlying method is updated, we'll throw away our counts so they can be reconstructed from scratch next time.This is not to be called by clients.
- Specified by:
notifyUpdate
in interfaceMethodData.Results
- Parameters:
info
- the method data this annotation is attached tonewInstructions
- the instructions the method will change tonewHandlers
- the handler lists the method will change tonewInstructionMap
- the instructions-to-bytecodes map the method will change to- Returns:
- true to remove the object from the info set, for example because the annotation is now invalid
-
getArrayLoadCount
- Throws:
IllegalArgumentException
-
getArrayStoreCount
- Throws:
IllegalArgumentException
-
getGetCount
- Throws:
IllegalArgumentException
-
getPutCount
- Throws:
IllegalArgumentException
-
getMonitorCount
- Throws:
IllegalArgumentException
-
getInvokeCount
- Throws:
IllegalArgumentException
-
getComparisonCount
- Throws:
IllegalArgumentException
-
getArrayLengthCount
- Throws:
IllegalArgumentException
-
getConstantCount
- Throws:
IllegalArgumentException
-
getShiftCount
- Throws:
IllegalArgumentException
-
getSwitchesCount
- Throws:
IllegalArgumentException
-
getSwapCount
- Throws:
IllegalArgumentException
-
getBinaryOpCount
- Throws:
IllegalArgumentException
-
getCheckCastCount
- Throws:
IllegalArgumentException
-
getThrowCount
- Throws:
IllegalArgumentException
-
getConditionalBranchCount
- Throws:
IllegalArgumentException
-
getConversionCount
- Throws:
IllegalArgumentException
-
getDupCount
- Throws:
IllegalArgumentException
-
getGotoCount
- Throws:
IllegalArgumentException
-
getReturnCount
- Throws:
IllegalArgumentException
-
getInstanceOfCount
- Throws:
IllegalArgumentException
-
getLocalLoadCount
- Throws:
IllegalArgumentException
-
getLocalStoreCount
- Throws:
IllegalArgumentException
-
getNewCount
- Throws:
IllegalArgumentException
-
getPopCount
- Throws:
IllegalArgumentException
-
getUnaryOpCount
- Throws:
IllegalArgumentException
-