private OperandMetadata getOperandMetadata(SleighDebugLogger logger, CodeUnit codeUnit,
			int operand) {

		// First get the mask/value strings for this operand.  The logger easily gives us these; 
		// note that the getMaskedBytes method is simply applying the operand mask to the full
		// instruction value string, to return a string that consists of the full value string
		// with everything BUT The operand masked out.
		byte[] mask = logger.getOperandValueMask(operand);
		byte[] value = logger.getMaskedBytes(mask);

		// If we're here, then things are good, so set the mask information in the container.
		OperandMetadata operandMetadata = new OperandMetadata();
		MaskContainer masks = new MaskContainer(mask, value);
		operandMetadata.setMaskContainer(masks);

		// If this code unit is an instruction there's some additional information we can
		// extract.
		if (codeUnit instanceof Instruction) {
			Instruction instr = (Instruction) codeUnit;
			operandMetadata.setTextRep(instr.getDefaultOperandRepresentation(operand));
			operandMetadata.setOpType(instr.getOperandType(operand));
		}

		return operandMetadata;
	}
Constructs a {@link OperandMetadata} object for the given operand.

@param logger the sleigh debug logger
@param codeUnit the code unit containing the operand
@param operand the index of the operand
@return the metadata for the operand
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/model/InstructionSearchData.java