private static boolean isEnumConstant(final ObjectReference objRef) {
    try {
      Type type = objRef.type();
      return type instanceof ClassType && ((ClassType)type).isEnum();
    }
    catch (ObjectCollectedException ignored) {
    }
    return false;
  }
private static boolean isEnumConstant(final ObjectReference objRef)