docs: @Override
      public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> envmt) throws Exception {
  
          if (tc.isEntryEnabled()) {
              Tr.entry(tc, "getObjectInstance: o=" + o + ",name=" + n + ",context=" + c + ",evnmt=" + envmt);
          }
  
          if (!(o instanceof Reference)) {
              if (tc.isEntryEnabled()) {
                  Tr.exit(tc, "Object " + o + " is not an instance of javax.naming.Reference. Returning null.");
              }
              return null;
          }
          Reference ref = (Reference) o;
          final Class<?> contextClass = Class.forName(ref.getClassName());
          if (tc.isDebugEnabled())
              Tr.debug(tc, "Creating a proxy for type {0}", contextClass);
          Object proxy = null;
  
          if (Application.class.equals(contextClass)) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "This is an Application sub-class being injected. Injecting an instance of ApplicationInjectionProxy.");
              }
              proxy = new ApplicationInjectionProxy();
          } else if (HttpServletRequest.class.equals(contextClass)) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "This is an HttpServletRequest sub-class being injected. Injecting an instance of HttpServletRequestInjectionProxy.");
              }
              proxy = new HttpServletRequestInjectionProxy();
          } else if (HttpServletResponse.class.equals(contextClass)) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "This is an HttpServletResponse sub-class being injected. Injecting an instance of HttpServletResponseInjectionProxy.");
              }
              proxy = new HttpServletResponseInjectionProxy();
          } else {
              proxy = Proxy.newProxyInstance(priv.getClassLoader(contextClass),
                                             new Class[] { contextClass },
                                             new InvocationHandler() {
                                                 @Override
                                                 public Object invoke(Object proxy,
                                                                      Method method,
                                                                      Object[] args) throws Throwable {
                                                     // Without these entry and exit calls RAS uses bytecode injection
                                                     // to insert Tr.entry on first line of this method and then Tr.exit
                                                     // on last lie. Tr.entry attempts to call proxy.toString(), which
                                                     // loops back to the invoke method again--hence resulting in a
                                                     // StackOverflowError
                                                     if (tc.isEntryEnabled()) {
                                                         Tr.entry(tc, "invoke");
                                                     }
  
                                                     Object result = null;
                                                     // use runtimeContext from TLS
                                                     InjectionRuntimeContext runtimeContext = InjectionRuntimeContextHelper.getRuntimeContext();
  
                                                     if ("toString".equals(method.getName()) && (method.getParameterTypes().length == 0)) {
                                                         result = "Proxy for " + contextClass.getName();
                                                         if (tc.isEntryEnabled()) {
                                                             Tr.exit(tc, "invoke", result);
                                                         }
                                                         return result;
                                                     }
  
                                                     // get the real context from the RuntimeContext
                                                     Object context = runtimeContext.getRuntimeCtxObject(contextClass.getName());
                                                     if (context != null) {
                                                         result = method.invoke(context, args);
                                                     }
  
                                                     if (tc.isEntryEnabled()) {
                                                         Tr.exit(tc, "invoke", result);
                                                     }
                                                     // invoke the method on the real context
                                                     return result;
                                                 }
                                             });
          }
  
          if (tc.isEntryEnabled()) {
              Tr.exit(tc, "getObjectInstance", proxy);
          }
  
          return proxy;
  
      }