public static String getMemberNameOrId(DistributedMember distributedMember) {
    String nameOrId = null;
    if (distributedMember != null) {
      nameOrId = distributedMember.getName();
      nameOrId = nameOrId != null && !nameOrId.isEmpty() ? nameOrId : distributedMember.getId();
    }
    return nameOrId;
  }
This class contains utility methods used by classes used to build the Command Line Interface
(CLI).

@since GemFire 7.0
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/CliUtils.java