Methods Summary |
---|
protected abstract org.hibernate.bytecode.BytecodeProvider | buildBytecodeProvider()
|
protected java.lang.ClassLoader | buildIsolatedClassLoader(java.lang.ClassLoader parent)
BytecodeProvider provider = buildBytecodeProvider();
return new InstrumentedClassLoader(
parent,
provider.getTransformer(
new BasicClassFilter( new String[] { "org.hibernate.test.instrument" }, null ),
new FieldFilter() {
public boolean shouldInstrumentField(String className, String fieldName) {
return className.startsWith( "org.hibernate.test.instrument.domain" );
}
public boolean shouldTransformFieldAccess(String transformingClassName, String fieldOwnerClassName, String fieldName) {
return fieldOwnerClassName.startsWith( "org.hibernate.test.instrument.domain" )
&& transformingClassName.equals( fieldOwnerClassName );
}
}
)
);
|
public void | executeExecutable(java.lang.String name)
Class execClass = null;
Object executable = null;
try {
execClass = Thread.currentThread().getContextClassLoader().loadClass( name );
executable = execClass.newInstance();
}
catch( Throwable t ) {
throw new HibernateException( "could not load executable", t );
}
try {
execClass.getMethod( "prepare", SIG ).invoke( executable, ARGS );
execClass.getMethod( "execute", SIG ).invoke( executable, ARGS );
}
catch ( NoSuchMethodException e ) {
throw new HibernateException( "could not exeucte executable", e );
}
catch ( IllegalAccessException e ) {
throw new HibernateException( "could not exeucte executable", e );
}
catch ( InvocationTargetException e ) {
throw new HibernateException( "could not exeucte executable", e.getTargetException() );
}
finally {
try {
execClass.getMethod( "complete", SIG ).invoke( executable, ARGS );
}
catch ( Throwable ignore ) {
}
}
|
protected void | releaseIsolatedClassLoader(java.lang.ClassLoader isolatedLoader)
|
public void | testDirtyCheck()
executeExecutable( "org.hibernate.test.instrument.cases.TestDirtyCheckExecutable" );
|
public void | testFetchAll()
executeExecutable( "org.hibernate.test.instrument.cases.TestFetchAllExecutable" );
|
public void | testLazy()
executeExecutable( "org.hibernate.test.instrument.cases.TestLazyExecutable" );
|
public void | testLazyManyToOne()
executeExecutable( "org.hibernate.test.instrument.cases.TestLazyManyToOneExecutable" );
|
public void | testLazyPropertyCustomType()
executeExecutable( "org.hibernate.test.instrument.cases.TestLazyPropertyCustomTypeExecutable" );
|
public void | testManyToOneProxy()
executeExecutable( "org.hibernate.test.instrument.cases.TestManyToOneProxyExecutable" );
|
public void | testPropertyInitialized()
executeExecutable( "org.hibernate.test.instrument.cases.TestIsPropertyInitializedExecutable" );
|
public void | testSetFieldInterceptor()
executeExecutable( "org.hibernate.test.instrument.cases.TestInjectFieldInterceptorExecutable" );
|