private void addLabelAndReference(Program program, Instruction switchInstruction,
			Address target, String label) {
		program.getReferenceManager()
				.addMemoryReference(switchInstruction.getMinAddress(), target,
					RefType.COMPUTED_JUMP, SourceType.ANALYSIS, CodeUnit.MNEMONIC);

		//put switch table cases into namespace for the switch 
		//create namespace if necessary
		Namespace space = null;
		String switchName =
			switchInstruction.getMnemonicString() + "_" + switchInstruction.getAddress().toString();
		try {
			space = program.getSymbolTable().createNameSpace(null, switchName, SourceType.ANALYSIS);
		}
		catch (DuplicateNameException e) {
			space = program.getSymbolTable().getNamespace(switchName, null);
		}
		catch (InvalidInputException e) {
			// just go with default space
		}
		try {
			program.getSymbolTable().createLabel(target, label, space, SourceType.ANALYSIS);
		}
		catch (InvalidInputException e1) {
			Msg.error(this, e1.getMessage());
		}
	}
This analyzer reads through JVM .class files looking for lookupswitch and tableswitch instructions.
 For each such instruction, the analyzer determines all the possible jump targets, disassembles them,
 and then newly-disassembled code to the appropriate function body.
Ghidra/Processors/JVM/src/main/java/ghidra/javaclass/analyzers/JvmSwitchAnalyzer.java