@SuppressWarnings("unchecked")
  public static <T> T getId(final Object identifiableObject) {
    if (isGetIdMethodAvailable(identifiableObject)) {
      final MethodInvoker method = new MethodInvoker();

      method.setTargetObject(identifiableObject);
      method.setTargetMethod("getId");

      try {
        return (T) method.invoke();
      } catch (Exception e) {
        LOGGER.log(Level.SEVERE, "Invocation failure.", e);
      }
    }

    return null;
  }
The IdentifierUtils class is a utility class for working with Objects having identifiers
<p>

@since GemFire 8.0
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/util/IdentifiableUtils.java