public class InstructionTypeCounter extends java.lang.Object implements MethodData.Results
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.
| Modifier and Type | Method and Description |
|---|---|
static int |
getArrayLengthCount(MethodData info) |
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 |
getConditionalBranchCount(MethodData info) |
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.
|
public boolean notifyUpdate(MethodData info, IInstruction[] newInstructions, ExceptionHandler[][] newHandlers, int[] newInstructionMap)
This is not to be called by clients.
notifyUpdate in interface MethodData.Resultsinfo - 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 topublic static int getArrayLoadCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getArrayStoreCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getGetCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getPutCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getMonitorCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getInvokeCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getComparisonCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getArrayLengthCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getConstantCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getShiftCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getSwitchesCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getSwapCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getBinaryOpCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getCheckCastCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getThrowCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getConditionalBranchCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getConversionCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getDupCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getGotoCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getReturnCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getInstanceOfCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getLocalLoadCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getLocalStoreCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getNewCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getPopCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static int getUnaryOpCount(MethodData info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException