private void setLabels(Program program, Address currentAddress, int len, int offset) {
		SymbolTable symbolTable = program.getSymbolTable();

		try {
			// Label table
			Symbol sym = symbolTable.getPrimarySymbol(currentAddress);

			if (sym == null || sym.isDynamic()) {
				symbolTable.createLabel(currentAddress, getTableName(offset), SourceType.ANALYSIS);
			}
			else {
				if (sym.getName().regionMatches(0, "AddrTable", 0, 9)) {
					sym.setName(getTableName(offset), SourceType.ANALYSIS);
				}
			}

			// Label table elements
//			Symbol elementSym;
//			for (int elementNum = 0; elementNum < len; elementNum++) {
//				// test to see if there is already an existing label - if not, then name table elements
//				elementSym = symbolTable.getPrimarySymbol(tableElements[elementNum+offset]);
//				String elementPrefix = getElementPrefix(offset);
//				String elementNumString = Integer.toString(elementNum, 10);
//				String elementName = elementPrefix + elementNumString;
//				if(elementSym == null || elementSym.isDynamic()) {
//					symbolTable.createSymbol(tableElements[elementNum+offset],elementName, SourceType.ANALYSIS);
//				}
//				else {
////					if(!elementSym.isUserDefined()) {
////						elementSym.setName(elementName);
////					}
//					String currentName = elementSym.getName();
//					if (currentName.startsWith("AddrTable")) {
//						if (currentName.startsWith(elementPrefix)) {
//							String suffix = currentName.substring(elementPrefix.length());
//							if (!hasNumInSuffix(suffix, elementNumString)) {
//								if (elementSym.getName().length() < 64) {
//									elementSym.setName(elementSym.getName()+"_"+ elementNumString, SourceType.ANALYSIS);
//								}
//							}
//						}
//						else {
//							elementSym.setName(elementName, SourceType.ANALYSIS);
//						}
//					}
//				}
//			}
			// Label table index if there is one
			if (getTopIndexAddress() != null) {
				Symbol indexSym;

				indexSym = symbolTable.getPrimarySymbol(getTopIndexAddress());
				if (indexSym == null || indexSym.isDynamic()) {
					symbolTable.createLabel(getTopIndexAddress(), getIndexName(offset),
						SourceType.ANALYSIS);
				}
				else {
					if ((indexSym.getName().regionMatches(0, "Index", 0, 5))) {
						indexSym.setName(getIndexName(offset), SourceType.ANALYSIS);
					}
				}
			}
		}
		catch (DuplicateNameException exc) {
		}
		catch (InvalidInputException exc) {
		}
	}
Test if this table has an element that points into the table.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/disassembler/AddressTable.java