public Integer createVftable(Address vftableAddress, boolean allowNullFunctionPtrs,
			boolean allowDefaultRefsInMiddle) throws CancelledException {

		int numFunctionPointers = 0;
		Address address = vftableAddress;

		MemoryBlock currentBlock = program.getMemory().getBlock(vftableAddress);

		if (currentBlock == null) {
			Msg.warn(this, "Cannot create vftable at " + vftableAddress.toString() +
				" because it is in an invalid memory block.");
			return null;
		}
		if (currentBlock.isExternalBlock() || !currentBlock.isInitialized()) {
			Msg.warn(this, "Cannot create vftable at " + vftableAddress.toString() +
				" because it is in an external or an uninitialized block.");
			return null;
		}

		boolean stillInCurrentTable = true;
		while (address != null && currentBlock.contains(address) && stillInCurrentTable &&
			extendedFlatAPI.isFunctionPointer(address, allowNullFunctionPtrs)) {
			numFunctionPointers++;
			address = address.add(defaultPointerSize);
			Symbol symbol = program.getSymbolTable().getPrimarySymbol(address);
			if (symbol == null) {
				continue;
			}
			// never let non-default refs
			if (symbol.getSource() != SourceType.DEFAULT) {
				stillInCurrentTable = false;
			}

			// if it gets here it is default
			if (!allowDefaultRefsInMiddle) {
				stillInCurrentTable = false;
			}
		}

		return numFunctionPointers;

	}
Method to create an array of pointers at the given vftable address
@param vftableAddress the vftable address
@param allowNullFunctionPtrs if true allow vftables to have null pointers
@param allowDefaultRefsInMiddle if true allow default references into the middle of the table
@return the number of functions in the table or null if none or in invalid block
@throws CancelledException if cancelled
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java