org.zkoss.bind.proxy
Class ProxyHelper

java.lang.Object
  extended by org.zkoss.bind.proxy.ProxyHelper

public class ProxyHelper
extends java.lang.Object

A proxy helper class to create a proxy cache mechanism for Set, List, Collection, Map, and POJO.

Since:
8.0.0
Author:
jumperchen

Constructor Summary
ProxyHelper()
           
 
Method Summary
static void addIgnoredProxyClass(java.lang.Class<?> type)
          Adds an ignored proxy class type.
static
<T> T
createFormProxy(T origin, java.lang.Class<?> type)
          Creates a proxy form object from the given origin object, if any.
static
<T> T
createProxyIfAny(T origin)
          Creates a proxy object from the given origin object, if any.
static
<T> T
createProxyIfAny(T origin, java.lang.annotation.Annotation[] annotations)
          Creates a proxy object from the given origin object, if any.
static boolean isImmutable(java.lang.Object origin)
          Returns whether the given origin object is immutable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyHelper

public ProxyHelper()
Method Detail

createProxyIfAny

public static <T> T createProxyIfAny(T origin)
Creates a proxy object from the given origin object, if any.

Parameters:
origin -

createProxyIfAny

public static <T> T createProxyIfAny(T origin,
                                     java.lang.annotation.Annotation[] annotations)
Creates a proxy object from the given origin object, if any.

Parameters:
origin -
annotations - the annotations of the caller method to indicate whether the elements of the collection or Map type can proxy deeply, if any. (Optional) Like ImmutableElements

addIgnoredProxyClass

public static void addIgnoredProxyClass(java.lang.Class<?> type)
Adds an ignored proxy class type. Once the data binder try to create a proxy object for the form binding, it will check whether the origin class type should be ignored.


isImmutable

public static boolean isImmutable(java.lang.Object origin)
Returns whether the given origin object is immutable.


createFormProxy

public static <T> T createFormProxy(T origin,
                                    java.lang.Class<?> type)
Creates a proxy form object from the given origin object, if any.

Parameters:
origin - the origin data object
type - the class type of the data object


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo