Examples of MethodInterceptor


Examples of com.gwtent.aop.client.intercept.MethodInterceptor

   */
  public Map<ClassType, Object> singletonAspects = new HashMap<ClassType, Object>();
  public Map<Method, MethodInterceptor> singletonInterceptors = new HashMap<Method, MethodInterceptor>();
 
  public MethodInterceptor getInstance(Method method) {
    MethodInterceptor result = singletonInterceptors.get(method);
    if (result == null){
      Object aspect = getAspectInstance(method.getEnclosingType());
      result = getMethodInterceptor(method, aspect);
      singletonInterceptors.put(method, result);
    }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

    public void destroyProxy(Object proxy) {
        if (proxy == null) {
            return;
        }

        MethodInterceptor methodInterceptor = (MethodInterceptor) interceptors.remove(proxy);
        if (methodInterceptor != null) {
            doDestroy(methodInterceptor);
        }
    }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

    public boolean isProxy(Object proxy) {
        return interceptors.containsKey(proxy);
    }

    public AbstractName getProxyTarget(Object proxy) {
        MethodInterceptor methodInterceptor = (MethodInterceptor) interceptors.get(proxy);
        if (methodInterceptor == null) {
            return null;
        }
        return getAbstractName(methodInterceptor);
    }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

    public void destroyProxy(Object proxy) {
        if (proxy == null) {
            return;
        }

        MethodInterceptor methodInterceptor = (MethodInterceptor) interceptors.remove(proxy);
        if (methodInterceptor != null) {
            doDestroy(methodInterceptor);
        }
    }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

    public boolean isProxy(Object proxy) {
        return interceptors.containsKey(proxy);
    }

    public AbstractName getProxyTarget(Object proxy) {
        MethodInterceptor methodInterceptor = (MethodInterceptor) interceptors.get(proxy);
        if (methodInterceptor == null) {
            return null;
        }
        return getAbstractName(methodInterceptor);
    }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

    public void destroyProxy(Object proxy) {
        if (proxy == null) {
            return;
        }

        MethodInterceptor methodInterceptor = (MethodInterceptor) interceptors.remove(proxy);
        if (methodInterceptor != null) {
            doDestroy(methodInterceptor);
        }
    }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

    public boolean isProxy(Object proxy) {
        return interceptors.containsKey(proxy);
    }

    public AbstractName getProxyTarget(Object proxy) {
        MethodInterceptor methodInterceptor = (MethodInterceptor) interceptors.get(proxy);
        if (methodInterceptor == null) {
            return null;
        }
        return getAbstractName(methodInterceptor);
    }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

        }
        if (superClass != null) {
            Enhancer enhancer = new Enhancer();
            enhancer.setSuperclass(superClass);
            enhancer.setInterfaces(theInterfaces.toArray(new Class[]{}));
            enhancer.setCallback(new MethodInterceptor() {

                public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy)
                    throws Throwable {
                    return h.invoke(obj, method, args);
                }
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

        createCallback();
    }

    @Override
    protected void createCallback() {
        this.callback = new MethodInterceptor() {

            @Override
            public Object intercept(final Object proxied, final Method proxiedMethod, final Object[] args, final MethodProxy proxyMethod) throws Throwable {

                final boolean ignore = proxiedMethod.getDeclaringClass().equals(Object.class);
View Full Code Here

Examples of net.sf.cglib.proxy.MethodInterceptor

        Enhancer.registerCallbacks(enhancedClass, new Callback[] { newMethodInterceptor(handler) });
        return (Class<T>) enhancedClass;
    }

    private static <T> MethodInterceptor newMethodInterceptor(final InvocationHandler handler) {
        return new MethodInterceptor() {
            @Override
            public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
                return handler.invoke(obj, method, args);
            }
        };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.