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" )