code: public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
     {
        if ("getReference".equals(method.getName()))
        {
           return reference;
        }
        else if ("setReference".equals(method.getName()))
        {
           this.reference = (Reference)args[0];
  
           if (delegate instanceof javax.resource.Referenceable)
           {
              ((javax.resource.Referenceable)delegate).setReference(this.reference);
           }
  
           return null;
        }
        else
        {
           return method.invoke(delegate, args);
        }
     }
docs: {@inheritDoc}