public final Class < ? > compile ( ) { if ( result == null ) { loader . loadJavaClass ( cg . getClassName ( ) , cg . getJavaClass ( ) ) ; try { result = loader . loadClass ( cg . getClassName ( ) ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( e ) ; } } return result ; }
Compiles the class and returns a class object which contains all added fields .