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

public Class ProxyFactoryFactoryImpl

extends Object
implements ProxyFactoryFactory
Class Inheritance
All Implemented Interfaces
org.hibernate.bytecode.ProxyFactoryFactory
Imports
org.hibernate.bytecode.ProxyFactoryFactory, .BasicProxyFactory, org.hibernate.proxy.ProxyFactory, org.hibernate.proxy.pojo.javassist.JavassistProxyFactory, org.hibernate.AssertionFailure, .HibernateException, javassist.util.proxy.MethodFilter, .ProxyObject, .MethodHandler, java.lang.reflect.Method, java.util.HashMap

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final MethodFilter

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 Javassist-based proxy factory.
buildProxyFactory
()

Implements org.hibernate.bytecode.ProxyFactoryFactory.buildProxyFactory.

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

Field Detail

FINALIZE_FILTERback to summary
private static final MethodFilter 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 Javassist-based proxy factory.

Returns:ProxyFactory

a new Javassist-based proxy factory.

org.hibernate.bytecode.javassist back to summary

private Class ProxyFactoryFactoryImpl.BasicProxyFactoryImpl

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

Field Summary

Modifier and TypeField and Description
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.
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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.

isInstanceback to summary
public boolean isInstance(Object object)
org.hibernate.bytecode.javassist back to summary

private Class ProxyFactoryFactoryImpl.PassThroughHandler

extends Object
implements MethodHandler
Class Inheritance
  • java.lang.Object
  • org.hibernate.bytecode.javassist.ProxyFactoryFactoryImpl.PassThroughHandler
All Implemented Interfaces
javassist.util.proxy.MethodHandler

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
PassThroughHandler(Object proxiedObject, String proxiedClassName)

Method Summary

Modifier and TypeMethod and Description
public Object
invoke(Object
the proxy instance.
object
,
Method
the overridden method declared in the super class or interface.
method
,
Method
the forwarder method for invoking the overridden method. It is null if the overridden mehtod is abstract or declared in the interface.
method1
,
Object[]
an array of objects containing the values of the arguments passed in the method invocation on the proxy instance. If a parameter type is a primitive type, the type of the array element is a wrapper class.
args
)

Implements javassist.util.proxy.MethodHandler.invoke.

Is called when a method is invoked on a proxy instance associated with this handler.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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

Constructor Detail

PassThroughHandlerback to summary
public PassThroughHandler(Object proxiedObject, String proxiedClassName)

Method Detail

invokeback to summary
public Object invoke(Object object, Method method, Method method1, Object[] args) throws Exception

Implements javassist.util.proxy.MethodHandler.invoke.

Doc from javassist.util.proxy.MethodHandler.invoke.

Is called when a method is invoked on a proxy instance associated with this handler. This method must process that method invocation.

Parameters
object:Object

the proxy instance.

method:Method

the overridden method declared in the super class or interface.

method1:Method

the forwarder method for invoking the overridden method. It is null if the overridden mehtod is abstract or declared in the interface.

args:Object[]

an array of objects containing the values of the arguments passed in the method invocation on the proxy instance. If a parameter type is a primitive type, the type of the array element is a wrapper class.

Returns:Object

the resulting value of the method invocation.