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