@Override
		public int visit(SubtableSymbol subtable, DisjointPattern pattern, Constructor cons,
				OpTpl op) {
			// Be nice :)
			if (monitor.isCancelled()) {
				return TERMINATE;
			}

			// Consider only root constructors
			if (!"instruction".equals(subtable.getName())) {
				return CONTINUE;
			}

			// Check any opcode is a return, and do something interesting if it does.
			if (op != null && op.getOpcode() == PcodeOp.RETURN) {
				byte[] whole = pattern.getWholeInstructionBytes();
				String pat = NumericUtilities.convertBytesToString(whole);
				println(subtable.getName() + " (" + pat + "," + cons + "): " + op);
			}
			return CONTINUE;
		}
This class receives a callback for each PCode op template visited. NOTE: if a constructor is
effectively a NOP (no PCode ops), it will still generate exactly one callback, where op is
null.
Ghidra/Features/Base/ghidra_scripts/LanguagesAPIDemoScript.java