private List<OperandMetadata> createOperandMetadata(PseudoInstruction instruction)
			throws MemoryAccessException {

		byte[] bytes = instruction.getParsedBytes();

		List<OperandMetadata> operands = new ArrayList<>();
		for (int i = 0; i < instruction.getNumOperands(); i++) {
			OperandMetadata operandMD = new OperandMetadata();
			operandMD.setOpType(instruction.getOperandType(i));
			operandMD.setTextRep(instruction.getDefaultOperandRepresentation(i));

			// The mask container is a bit tricky.  The mask string we can get directly from the
			// prototype object in the pseudo instruction. For the value string we have to do
			// a bit of calculating: we know the entire instruction byte string and we know
			// this operand mask, so AND them together and we get the operand bytes.
			InstructionPrototype prototype = instruction.getPrototype();
			byte[] mask = prototype.getOperandValueMask(i).getBytes();
			byte[] value = InstructionSearchUtils.byteArrayAnd(mask, bytes);
			MaskContainer maskContainer = new MaskContainer(mask, value);

			operandMD.setMaskContainer(maskContainer);
			operands.add(operandMD);
		}

		return operands;
	}
Creates {@link OperandMetadata} objects for each operand in the
instruction provided.

@param instruction the instruction to parse
@return list of operand metadata
@throws MemoryAccessException if there is an exception getting instruction bytes
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/ui/InsertBytesWidget.java