@groovy.transform.CompileStatic class GroovyProxyFactory extends java.lang.Object implements ProxyFactory
Implements the proxy interface and creates a Groovy proxy by passing the need for javassist style proxies and all the problems they bring.
Constructor and description |
---|
GroovyProxyFactory() |
Type Params | Return Type | Name and description |
---|---|---|
<T> |
T |
createProxy(Session session, java.lang.Class<T> type, java.io.Serializable key) Creates a proxy |
<T, K extends Serializable> |
T |
createProxy(Session session, AssociationQueryExecutor<K, T> executor, K associationKey) |
|
protected java.io.Serializable |
getIdDynamic(java.lang.Object obj) |
|
java.io.Serializable |
getIdentifier(java.lang.Object obj) |
|
java.lang.Class<?> |
getProxiedClass(java.lang.Object o) |
|
protected ProxyInstanceMetaClass |
getProxyInstanceMetaClass(java.lang.Object object) |
|
void |
initialize(java.lang.Object o) |
|
boolean |
isInitialized(java.lang.Object object) |
|
boolean |
isInitialized(java.lang.Object object, java.lang.String associationName) |
|
boolean |
isProxy(java.lang.Object object) Check our object has the correct meta class to be a proxy of this type. |
<T> |
protected groovy.lang.MetaClass |
resolveTargetMetaClass(T proxy, java.lang.Class<T> type) |
|
java.lang.Object |
unwrap(java.lang.Object object) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates a proxy
T
- The type of the proxy to createsession
- The session instancetype
- The type of the proxy to createkey
- The key to proxyCheck our object has the correct meta class to be a proxy of this type.
object
- The object.