public void setFunction(Function function) {
		functionName = function.getName();
		functionComments = function.getCommentAsArray();

		Variable[] vars = function.getAllVariables();
		Variable[] stackVars = function.getVariables(VariableFilter.STACK_VARIABLE_FILTER);

		stackVarNames = new String[stackVars.length];
		stackVarSources = new SourceType[stackVars.length];
		stackOffsets = new int[stackVars.length];
		stackVarFUOffsets = new int[stackVars.length];
		stackVarComments = new String[stackVars.length];
		setStackVarInfo(stackVars);

		int nonStackVariableCount = vars.length - stackVars.length;
		varNames = new String[nonStackVariableCount];
		varSources = new SourceType[nonStackVariableCount];
		varAddrs = new Address[nonStackVariableCount];
		varFUOffsets = new int[nonStackVariableCount];
		varComments = new String[nonStackVariableCount];
		setNonStackVarInfo(vars);
	}
Set the function info.
@param function function used to get function info to transfer
Ghidra/Features/Base/src/main/java/ghidra/app/util/CodeUnitInfo.java