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 intstatic intgetArrayLoadCount(MethodData info) static intgetArrayStoreCount(MethodData info) static intgetBinaryOpCount(MethodData info) static intgetCheckCastCount(MethodData info) static intgetComparisonCount(MethodData info) static intstatic intgetConstantCount(MethodData info) static intgetConversionCount(MethodData info) static intgetDupCount(MethodData info) static intgetGetCount(MethodData info) static intgetGotoCount(MethodData info) static intgetInstanceOfCount(MethodData info) static intgetInvokeCount(MethodData info) static intgetLocalLoadCount(MethodData info) static intgetLocalStoreCount(MethodData info) static intgetMonitorCount(MethodData info) static intgetNewCount(MethodData info) static intgetPopCount(MethodData info) static intgetPutCount(MethodData info) static intgetReturnCount(MethodData info) static intgetShiftCount(MethodData info) static intgetSwapCount(MethodData info) static intgetSwitchesCount(MethodData info) static intgetThrowCount(MethodData info) static intgetUnaryOpCount(MethodData info) booleannotifyUpdate(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:
notifyUpdatein 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
-