private void fixupFunction(Program program, Instruction instruction, List<Address> additions,
			TaskMonitor monitor) {
		Function func =
			program.getFunctionManager().getFunctionContaining(instruction.getAddress());
		AddressSet newBody = new AddressSet(func.getBody());
		for (Address addr : additions) {
			newBody.add(addr);
		}
		try {
			func.setBody(newBody);
		}
		catch (OverlappingFunctionException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		try {
			CreateFunctionCmd.fixupFunctionBody(program, func, monitor);
		}
		catch (CancelledException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
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