public List<TableName> listTableNames(final String namespace, final String regex,
    final boolean includeSysTables) throws IOException {
    List<TableDescriptor> htds = new ArrayList<>();
    if (cpHost != null) {
      cpHost.preGetTableNames(htds, regex);
    }
    htds = getTableDescriptors(htds, namespace, regex, null, includeSysTables);
    if (cpHost != null) {
      cpHost.postGetTableNames(htds, regex);
    }
    List<TableName> result = new ArrayList<>(htds.size());
    for (TableDescriptor htd : htds)
      result.add(htd.getTableName());
    return result;
  }
Returns the list of table names that match the specified request
@param regex            The regular expression to match against, or null if querying for all
@param namespace        the namespace to query, or null if querying for all
@param includeSysTables False to match only against userspace tables
@return the list of table names
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java