Package org.hibernate.repackage.cglib.asm

Examples of org.hibernate.repackage.cglib.asm.ClassWriter


      log.error( "Unable to read class", e );
      throw new HibernateException( "Unable to read class: " + e.getMessage() );
    }

    String[] names = ClassNameReader.getClassInfo( reader );
    ClassWriter w = new DebuggingClassWriter( true );
    ClassTransformer t = getClassTransformer( names );
    if ( t != null ) {
      if ( log.isDebugEnabled() ) {
        log.debug( "Enhancing " + className );
      }
      ByteArrayOutputStream out;
      byte[] result;
      try {
        reader = new ClassReader( new ByteArrayInputStream( classfileBuffer ) );
        new TransformingClassGenerator(
            new ClassReaderGenerator( reader, attributes(), skipDebug() ), t
        ).generateClass( w );
        out = new ByteArrayOutputStream();
        out.write( w.toByteArray() );
        result = out.toByteArray();
        out.close();
      }
      catch (Exception e) {
        log.error( "Unable to transform class", e );
View Full Code Here

TOP

Related Classes of org.hibernate.repackage.cglib.asm.ClassWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.