code: public static Object tryGetSingleton(Class<?> invokerClass, App app) {
          Object singleton = app.singleton(invokerClass);
          if (null == singleton) {
              if (isGlobalOrStateless(invokerClass, new HashSet<Class>())) {
                  singleton = app.getInstance(invokerClass);
              }
          }
          if (null != singleton) {
              app.registerSingleton(singleton);
          }
          return singleton;
      }
docs: If the `invokerClass` specified is singleton, or without field or all fields are
  stateless, then return an instance of the invoker class. Otherwise, return null
  @param invokerClass the invoker class
  @param app the app
  @return an instance of the invokerClass or `null` if invoker class is stateful class