public void addConstructorsToClassNamespace(RecoveredClass recoveredClass,
			Structure classStruct) throws Exception {

		DataType undefinedDT = null;
		if (defaultPointerSize == 4) {
			undefinedDT = new Undefined4DataType();
		}
		if (defaultPointerSize == 8) {
			undefinedDT = new Undefined8DataType();
		}

		Namespace classNamespace = recoveredClass.getClassNamespace();
		String className = recoveredClass.getName();

		List<Function> constructorList = recoveredClass.getConstructorList();
		for (Function constructorFunction : constructorList) {
			monitor.checkCancelled();
			// cannot edit external functions
			if (constructorFunction.isExternal()) {
				continue;
			}

			if (nameVfunctions) {
				createNewSymbolAtFunction(constructorFunction, className, classNamespace, true,
					true);
			}

			// commit what the decompiler knows first so that retyping will not
			// completely overwrite decompiler with listing signature
			decompilerUtils.commitFunction(constructorFunction);

			HighFunction highFunction = decompilerUtils.getHighFunction(constructorFunction);
			if (highFunction == null) {
				String msg =
					"Decompiler Error: Failed to decompile function possibly due to the addition of class structure. ";

				Msg.debug(this, msg + constructorFunction.getEntryPoint());

				program.getBookmarkManager()
						.setBookmark(constructorFunction.getEntryPoint(), BookmarkType.ERROR,
							"Decompiler Error", msg);
				continue;
			}

			DataType returnType = highFunction.getFunctionPrototype().getReturnType();
			if (returnType == null) {
				Msg.debug(this,
					"ERROR: Return type is null " + constructorFunction.getEntryPoint());
				continue;
			}

			// if a FID function and isn't void or * change it to undefined so the decompiler will
			// recompute it
			String returnTypeString = returnType.getDisplayName();
			if (isFidFunction(constructorFunction) && returnTypeString != "void" &&
				!returnTypeString.contains("*")) {

				if (undefinedDT != null) {
					constructorFunction.setReturnType(undefinedDT, SourceType.ANALYSIS);
				}
			}

			// if return type is a pointer then make sure it is the class structure 
			if (returnType.getDisplayName().contains("*")) {
				DataType classPointerDataType = dataTypeManager.getPointer(classStruct);
				if (!returnType.isEquivalent(classPointerDataType)) {
					constructorFunction.setReturnType(classPointerDataType,
						SourceType.ANALYSIS);
				}
			}

		}
	}
Method to name class constructors and add them to class namespace
@param recoveredClass current class
@param classStruct the given class structure
@throws Exception when cancelled
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java