public class ProxyHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ProxyHelper.ProxyDecorator
An interface to decorate the
ProxyObject for some purposes, like
providing custom validation logic or adding extra handler on it. |
| Constructor and Description |
|---|
ProxyHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addIgnoredProxyClass(Class<?> type)
Adds an ignored proxy class type.
|
static void |
addIgnoredSuperProxyClass(Class<?> type)
Adds an ignored super proxy class type.
|
static String |
capitalize(String prefix,
String attr)
Internal use only.
|
static <T> T |
createFormProxy(T origin,
Class<?> type)
Creates a proxy form object from the given origin object, if any.
|
static <T> T |
createFormProxy(T origin,
Class<?> type,
Class[] interfaces)
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,
Annotation[] annotations)
Creates a proxy object from the given origin object, if any.
|
static <T> T |
getOriginObject(T origin)
Internal use only.
|
static boolean |
isAttribute(Method method)
Internal use only.
|
static boolean |
isImmutable(Object origin)
Returns whether the given origin object is immutable.
|
static String |
toAttrName(Method method)
Internal use only.
|
static String |
toAttrName(Method method,
int prefix)
Internal use only.
|
static String |
toGetter(String attr)
Internal use only.
|
static String |
toSetter(String attr)
Internal use only.
|
public static <T> T createProxyIfAny(T origin)
origin - public static <T> T createProxyIfAny(T origin,
Annotation[] annotations)
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 ImmutableElementspublic static void addIgnoredProxyClass(Class<?> type)
Default it will apply these classes from the library property
org.zkoss.bind.proxy.IgnoredProxyClasses
public static void addIgnoredSuperProxyClass(Class<?> type)
Default it will apply these classes from the library property
org.zkoss.bind.proxy.IgnoredSuperProxyClasses
public static boolean isImmutable(Object origin)
public static <T> T getOriginObject(T origin)
public static <T> T createFormProxy(T origin,
Class<?> type)
origin - the origin data objecttype - the class type of the data objectpublic static <T> T createFormProxy(T origin,
Class<?> type,
Class[] interfaces)
origin - the origin data objecttype - the class type of the data objectinterfaces - the interface type of the data object, if any.public static boolean isAttribute(Method method)
Copyright © 2020. All rights reserved.