Class BytecodeScanner
java.lang.Object
edu.umd.cs.findbugs.ba.BytecodeScanner
Scan the raw bytecodes of a method. This is useful in order to find out
quickly whether or not a method uses particular instructions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback interface to report scanned instructions. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intextractInt(byte[] arr, int offset) Extract an int from bytes at the given offset in the array.voidscan(byte[] instructionList, BytecodeScanner.Callback callback) Scan the raw bytecodes of a method.private static shortunsignedValueOf(byte value) Convert the unsigned value of a byte into a short.
-
Field Details
-
DEBUG
private static final boolean DEBUG -
PAD
private static final int[] PAD
-
-
Constructor Details
-
BytecodeScanner
public BytecodeScanner()
-
-
Method Details
-
unsignedValueOf
private static short unsignedValueOf(byte value) Convert the unsigned value of a byte into a short.- Parameters:
value- the byte- Returns:
- the byte's unsigned value as a short
-
extractInt
private static int extractInt(byte[] arr, int offset) Extract an int from bytes at the given offset in the array.- Parameters:
arr- the arrayoffset- the offset in the array
-
scan
Scan the raw bytecodes of a method.- Parameters:
instructionList- the bytecodescallback- the callback object
-