public static void record(Object a, Object b) {
		//		if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {
		//			log.info("recording invocation of generate with " + (a == null ? "null" : a.getClass().getName()) + " b="
		//					+ (b == null ? "null" : b.getClass().getName()));
		//		}
		// a is a Lnet/sf/cglib/core/GeneratorStrategy;
		// b is a Lnet/sf/cglib/core/AbstractClassGenerator (or specifically net/sf/cglib/reflect/FastClass$Generator)
		// a is something like 'UndeclaredThrowableStrategy'
		// b is an Enhancer:  namePrefix="example.Simple" superclass=example.Simple
		String generatorName = b.getClass().getName();
		if (generatorName.endsWith(".cglib.proxy.Enhancer")) {
			try {
				Field f = b.getClass().getDeclaredField("superclass");
				f.setAccessible(true);
				Class<?> clazz = (Class<?>) f.get(b);
				if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {
					log.info("recording pair " + clazz.getName() + " > " + b);
				}
				clazzToGeneratorStrategyAndClassGeneratorMap.put(clazz, new Object[] { a, b });
			}
			catch (Throwable re) {
				re.printStackTrace();
			}
		}
		else if (generatorName.endsWith(".cglib.reflect.FastClass$Generator")) {
			try {
				Field f = b.getClass().getDeclaredField("type");
				f.setAccessible(true);
				Class<?> clazz = (Class<?>) f.get(b);
				if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {
					log.info("recording pair (fastclass) " + clazz.getName() + " > " + b);
				}
				clazzToGeneratorStrategyAndFastClassGeneratorMap.put(clazz, new Object[] { a, b });
			}
			catch (Throwable re) {
				re.printStackTrace();
			}
		}
	}
public static void record ( Object a , Object b ) { String generatorName = b . getClass ( ) . getName ( ) ; if ( generatorName . endsWith ( ".cglib.proxy.Enhancer" ) ) { try { Field f = b . getClass ( ) . getDeclaredField ( "superclass" ) ; f . setAccessible ( true ) ; Class < ? > clazz = ( Class < ? > ) f . get ( b ) ; if ( GlobalConfiguration . isRuntimeLogging && log . isLoggable ( Level . INFO ) ) { log . info ( "recording pair " + clazz . getName ( ) + " > " + b ) ; } clazzToGeneratorStrategyAndClassGeneratorMap . put ( clazz , new Object [ ] { a , b } ) ; } catch ( Throwable re ) { re . printStackTrace ( ) ; } } else if ( generatorName . endsWith ( ".cglib.reflect.FastClass$Generator" ) ) { try { Field f = b . getClass ( ) . getDeclaredField ( "type" ) ; f . setAccessible ( true ) ; Class < ? > clazz = ( Class < ? > ) f . get ( b ) ; if ( GlobalConfiguration . isRuntimeLogging && log . isLoggable ( Level . INFO ) ) { log . info ( "recording pair (fastclass) " + clazz . getName ( ) + " > " + b ) ; } clazzToGeneratorStrategyAndFastClassGeneratorMap . put ( clazz , new Object [ ] { a , b } ) ; } catch ( Throwable re ) { re . printStackTrace ( ) ; } } }
The classloader for class artifacts is used to load the generated classes for call sites. We need to rewrite
these classes because they may be either calling something that disappears on a later reload (so need to fail
appropriately) or calling something that isnt there on the first load - in this latter case they are changed to
route the dynamic executor method.

@param a the GeneratorStrategy being used
@param b the AbstractClassGenerator