Package java.lang.reflect

Examples of java.lang.reflect.Proxy$ProxyType


    {
      releaseService(pf);

      try
      {
        Proxy proxy = (Proxy) pf;

        proxy.getInvocationHandler(proxy).invoke(proxy, KeelServiceable.class.getMethod("releaseServices"),
                new Object[]
                {});
      }
      catch (Throwable x)
      {
View Full Code Here


  /**
   * @param serviceable
   */
  private void releaseChild(Object serviceable)
  {
    Proxy proxy = (Proxy) serviceable;

    try
    {
      proxy.getInvocationHandler(proxy).invoke(proxy, KeelServiceable.class.getMethod("releaseServices"),
              new Object[]
              {});
    }
    catch (Throwable x)
    {
View Full Code Here

        for (Class businessIntfClass : localBusinessIntfs) {
            EJBLocalObjectInvocationHandlerDelegate delegate =
                new EJBLocalObjectInvocationHandlerDelegate(
                        businessIntfClass, getContainerId(), handler);
            Proxy proxy = (Proxy) Proxy.newProxyInstance(
                    loader, new Class[] { IndirectlySerializable.class,
                                   businessIntfClass}, delegate);
            localBusinessObjImpl.mapClientObject(businessIntfClass.getName(),
                    proxy);
        }
View Full Code Here

        Class businessIntfClass = ejbGeneratedOptionalLocalBusinessIntfClass;
        EJBLocalObjectInvocationHandlerDelegate delegate =
            new EJBLocalObjectInvocationHandlerDelegate(
                    businessIntfClass, getContainerId(), handler);
        Proxy proxy = (Proxy) Proxy.newProxyInstance(
                loader, new Class[] { IndirectlySerializable.class,
                               businessIntfClass}, delegate);

        String beanSubClassName = ejbGeneratedOptionalLocalBusinessIntfClass.getName() + "__Bean__";
View Full Code Here

                            }
                            return null;
                        }
                    });

                Proxy proxy = (Proxy) proxyField.get(managedBean);

                InterceptorInvoker invoker = (InterceptorInvoker) Proxy.getInvocationHandler(proxy);

                managedBeanInstance = invoker.getTargetInstance();
View Full Code Here

     * is proxying.
     **/
    public static ObjectName getObjectName(Object proxy) {
        if (!(proxy instanceof Proxy))
            throw new IllegalArgumentException("not a "+Proxy.class.getName());
        final Proxy p = (Proxy) proxy;
        final InvocationHandler handler =
                Proxy.getInvocationHandler(proxy);
        if (handler instanceof MBeanServerInvocationHandler)
            return ((MBeanServerInvocationHandler)handler).getObjectName();
        throw new IllegalArgumentException("not a JMX Proxy");
View Full Code Here

        if (proxy instanceof NotificationEmitter)
            return proxy;
        if (proxy == null) return null;
        if (!(proxy instanceof Proxy))
            throw new IllegalArgumentException("not a "+Proxy.class.getName());
        final Proxy p = (Proxy) proxy;
        final InvocationHandler handler =
                Proxy.getInvocationHandler(proxy);
        if (!(handler instanceof MBeanServerInvocationHandler))
            throw new IllegalArgumentException("not a JMX Proxy");
        final MBeanServerInvocationHandler h =
View Full Code Here

                            }
                            return null;
                        }
                    });

                Proxy proxy = (Proxy) proxyField.get(managedBean);

                InterceptorInvoker invoker = (InterceptorInvoker) Proxy.getInvocationHandler(proxy);

                managedBeanInstance = invoker.getTargetInstance();
View Full Code Here

      Fake() {
        super(null);
      }
    }

    Proxy fake = new Proxy(new InvocationHandler() {
      public Object invoke(Object proxy, Method method, Object[] args)
          throws Throwable {
        return null;
      }
    }) {
    };

    assertTrue("Does not believe its a Proxy class ", Proxy
        .isProxyClass(proxy));
    assertTrue("Proxy subclasses do not count ", !Proxy
        .isProxyClass(Fake.class));
    assertTrue("Is not a runtime generated Proxy class ", !Proxy
        .isProxyClass(fake.getClass()));
  }
View Full Code Here

                                 new String[] { "java.lang.Object" }
            );
         }
         else if (Proxy.isProxyClass(args[0].getClass()))
         {
            Proxy prxy = (Proxy)args[0];
            return new Boolean(this.equals(Proxy.getInvocationHandler(prxy)));
         }
         else
         {
            return new Boolean(this.equals(args[0]));
View Full Code Here

TOP

Related Classes of java.lang.reflect.Proxy$ProxyType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.