BytecodeScanner.Callback callback = new BytecodeScanner.Callback() { public void handleInstruction(int opcode) { result.set(opcode, true); } };   BytecodeScanner scanner = new BytecodeScanner(); scanner.scan(instructionList, callback);
Code code = method.getCode(); if (code != null) { byte[] instructionList = code.getCode();    BytecodeScanner.Callback callback = new BytecodeScanner.Callback() { public void handleInstruction(int opcode) { result.set(opcode, true); } };   BytecodeScanner scanner = new BytecodeScanner(); scanner.scan(instructionList, callback); }
	public BitSet getBytecodeSet(Method method) {		BitSet bytecodeSet = bytecodeMap.get(method);		if (bytecodeSet == null) {			final BitSet result = new BitSet();			byte[] instructionList = method.getCode().getCode();			// Create a callback to put the opcodes of the method's			// bytecode instructions into the BitSet.			BytecodeScanner.Callback callback = new BytecodeScanner.Callback() {				public void handleInstruction(int opcode) {					result.set(opcode, true);				}			};			// Scan the method.			BytecodeScanner scanner = new BytecodeScanner();			scanner.scan(instructionList, callback);			// Save the result in the map.			bytecodeSet = result;			bytecodeMap.put(method, bytecodeSet);		}		return bytecodeSet;	}