Package net.sourceforge.javautil.interceptor.type

Examples of net.sourceforge.javautil.interceptor.type.InterceptorInvocationHandler


   * @see PojoViewManipulator
   */
  protected static Map<Class, Object> getViewMap (Object instance) {
    Map<String, Object> stateMap = null;
    if (Proxy.isProxyClass(instance.getClass())) {
      InterceptorInvocationHandler svih = (InterceptorInvocationHandler) Proxy.getInvocationHandler(instance);
      stateMap = InterceptorInvocationHandler.getStateMap(svih);
     
      if (stateMap == null) return null;
    } else {
      ClassField field = ClassCache.getFor(instance.getClass()).getField(InterceptorProxyTypeCJCW.ABILITIES_FIELD_NAME);
View Full Code Here


   * @param interceptors The interceptors to use when proxied
   * @return The proxy instance
   */
  public <T> T getProxy (ClassLoader proxyClassLoader, IInterceptedInstanceWrapper<T> instance, Class<T> iface, IInterceptorManager interceptor) {
    List<IInterceptorManipulator> abilities = this.getInterceptorAbilities(iface);
    InterceptorInvocationHandler handler = new InterceptorInvocationHandler(instance, interceptor);
   
    T proxy = (T) Proxy.newProxyInstance(proxyClassLoader, new Class[] { iface }, handler);
    for (IInterceptorManipulator ability : abilities) {
      ability.manipulate(iface, interceptor, proxy, InterceptorInvocationHandler.getStateMap(handler));
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.interceptor.type.InterceptorInvocationHandler

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.