Top Description Inners Fields Constructors Methods
org.hibernate.bytecode.cglib

public Class ProxyFactoryFactoryImpl

extends Object
implements ProxyFactoryFactory
Class Inheritance
All Implemented Interfaces
org.hibernate.bytecode.ProxyFactoryFactory
Annotations
@Deprecated
Imports
org.hibernate.bytecode.ProxyFactoryFactory, .BasicProxyFactory, org.hibernate.proxy.ProxyFactory, org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory, org.hibernate.AssertionFailure, .HibernateException, net.sf.cglib.proxy.Enhancer, .CallbackFilter, .MethodInterceptor, .MethodProxy, .NoOp, .Callback, .Factory, java.lang.reflect.Method, java.util.HashMap

Deprecated

Per HHH-5451 support for cglib as a bytecode provider has been deprecated.

A factory for CGLIB-based ProxyFactory instances.
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static class

Field Summary

Modifier and TypeField and Description
private static final Class<T>[]
private static final CallbackFilter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BasicProxyFactory
buildBasicProxyFactory(Class<T>
The abstract super class (or null if none).
superClass
,
Class<T>[]
Interfaces to be proxied (or null if none).
interfaces
)

Implements org.hibernate.bytecode.ProxyFactoryFactory.buildBasicProxyFactory.

Build a proxy factory for basic proxy concerns.
public ProxyFactory

Returns:

a new CGLIB-based proxy factory.
buildProxyFactory
()

Implements org.hibernate.bytecode.ProxyFactoryFactory.buildProxyFactory.

Builds a CGLIB-based proxy factory.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CALLBACK_TYPESback to summary
private static final Class<T>[] CALLBACK_TYPES
FINALIZE_FILTERback to summary
private static final CallbackFilter FINALIZE_FILTER

Constructor Detail

ProxyFactoryFactoryImplback to summary
public ProxyFactoryFactoryImpl()

Method Detail

buildBasicProxyFactoryback to summary
public BasicProxyFactory buildBasicProxyFactory(Class<T> superClass, Class<T>[] interfaces)

Implements org.hibernate.bytecode.ProxyFactoryFactory.buildBasicProxyFactory.

Doc from org.hibernate.bytecode.ProxyFactoryFactory.buildBasicProxyFactory.

Build a proxy factory for basic proxy concerns. The return should be capable of properly handling newInstance() calls.

Should build basic proxies essentially equivalent to JDK proxies in terms of capabilities, but should be able to deal with abstract super classes in addition to proxy interfaces.

Must pass in either superClass or interfaces (or both).

Parameters
superClass:Class<T>

The abstract super class (or null if none).

interfaces:Class<T>[]

Interfaces to be proxied (or null if none).

Returns:BasicProxyFactory

The proxy class

buildProxyFactoryback to summary
public ProxyFactory buildProxyFactory()

Implements org.hibernate.bytecode.ProxyFactoryFactory.buildProxyFactory.

Builds a CGLIB-based proxy factory.

Returns:ProxyFactory

a new CGLIB-based proxy factory.

org.hibernate.bytecode.cglib back to summary

public Class ProxyFactoryFactoryImpl.BasicProxyFactoryImpl

extends Object
implements BasicProxyFactory
Class Inheritance
  • java.lang.Object
  • org.hibernate.bytecode.cglib.ProxyFactoryFactoryImpl.BasicProxyFactoryImpl
All Implemented Interfaces
org.hibernate.bytecode.BasicProxyFactory

Field Summary

Modifier and TypeField and Description
private final Factory
private final Class<T>

Constructor Summary

AccessConstructor and Description
public
BasicProxyFactoryImpl(Class<T> superClass, Class<T>[] interfaces)

Method Summary

Modifier and TypeMethod and Description
public Object
getProxy()

Implements org.hibernate.bytecode.BasicProxyFactory.getProxy.

Get a proxy reference.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

factoryback to summary
private final Factory factory
proxyClassback to summary
private final Class<T> proxyClass

Constructor Detail

BasicProxyFactoryImplback to summary
public BasicProxyFactoryImpl(Class<T> superClass, Class<T>[] interfaces)

Method Detail

getProxyback to summary
public Object getProxy()

Implements org.hibernate.bytecode.BasicProxyFactory.getProxy.

Doc from org.hibernate.bytecode.BasicProxyFactory.getProxy.

Get a proxy reference.

Returns:Object

A proxy reference.

org.hibernate.bytecode.cglib back to summary

private Class ProxyFactoryFactoryImpl.PassThroughInterceptor

extends Object
implements MethodInterceptor
Class Inheritance
  • java.lang.Object
  • org.hibernate.bytecode.cglib.ProxyFactoryFactoryImpl.PassThroughInterceptor
All Implemented Interfaces
net.sf.cglib.proxy.MethodInterceptor, net.sf.cglib.proxy.Callback

Field Summary

Modifier and TypeField and Description
private HashMap<K, V>
private final String

Constructor Summary

AccessConstructor and Description
public
PassThroughInterceptor(String proxiedClassName)

Method Summary

Modifier and TypeMethod and Description
public Object
intercept(Object
"this", the enhanced object
obj
,
Method
intercepted Method
method
,
Object[]
argument array; primitive types are wrapped
args
,
MethodProxy
used to invoke super (non-intercepted method); may be called as many times as needed
proxy
)

Implements net.sf.cglib.proxy.MethodInterceptor.intercept.

All generated proxied methods call this method instead of the original method.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private HashMap<K, V> data
proxiedClassNameback to summary
private final String proxiedClassName

Constructor Detail

PassThroughInterceptorback to summary
public PassThroughInterceptor(String proxiedClassName)

Method Detail

interceptback to summary
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable

Implements net.sf.cglib.proxy.MethodInterceptor.intercept.

Doc from net.sf.cglib.proxy.MethodInterceptor.intercept.

All generated proxied methods call this method instead of the original method. The original method may either be invoked by normal reflection using the Method object, or by using the MethodProxy (faster).

Parameters
obj:Object

"this", the enhanced object

method:Method

intercepted Method

args:Object[]

argument array; primitive types are wrapped

proxy:MethodProxy

used to invoke super (non-intercepted method); may be called as many times as needed

Returns:Object

any value compatible with the signature of the proxied method. Method returning void will ignore this value.

Exceptions
Throwable:
any exception may be thrown; if so, super method will not be invoked