Hibernate ORM JavassistProxyFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM JavassistProxyFactory class.

This code example shows how to use the following methods:
	 * Builds a Javassist-based proxy factory. 
	 * 
	 * @return a new Javassist-based proxy factory. 
	 */ 
	public ProxyFactory buildProxyFactory() {
		return new JavassistProxyFactory();
	} 
 
	public BasicProxyFactory buildBasicProxyFactory(Class superClass, Class[] interfaces) {
		return new BasicProxyFactoryImpl( superClass, interfaces );
	} 
 
	private static class BasicProxyFactoryImpl implements BasicProxyFactory {
		private final Class proxyClass;
 
		public BasicProxyFactoryImpl(Class superClass, Class[] interfaces) {
			if ( superClass == null && ( interfaces == null || interfaces.length < 1 ) ) {
				throw new AssertionFailure( "attempting to build proxy without any superclass or interfaces" );
			} 
			javassist.util.proxy.ProxyFactory factory = new javassist.util.proxy.ProxyFactory();
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE