@Override
	public boolean test(MemoryMatch match) {
		if (includeAll) {
			return true;
		}
		CodeUnit codeUnit = listing.getCodeUnitContaining(match.getAddress());
		if (codeUnit instanceof Instruction) {
			return includeInstructions;
		}
		else if (codeUnit instanceof Data) {
			Data data = (Data) codeUnit;
			if (data.isDefined()) {
				return includeDefinedData;
			}
			return includeUndefinedData;
		}
		return false;
	}
Constructor
@param program the program to get code units from for testing its type
@param includeInstructions if true, accept matches that are in an instruction
@param includeDefinedData if true, accept matches that are in defined data
@param includeUndefinedData if true, accept matches that are in undefined data
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/searcher/CodeUnitFilter.java