Package org.hibernate.bytecode.spi

Examples of org.hibernate.bytecode.spi.ClassTransformer


   * @throws Exception Indicates an issue either access files or applying the transformations.
   */
  protected void processClassFile(File file, Set<String> classNames) throws Exception {
    final byte[] bytes = ByteCodeHelper.readByteCode( file );
    final ClassDescriptor descriptor = getClassDescriptor( bytes );
    final ClassTransformer transformer = getClassTransformer( descriptor, classNames );
    if ( transformer == null ) {
      logger.debug( "no trasformer for class file : " + file.getAbsolutePath() );
      return;
    }

    logger.info( "processing class : " + descriptor.getName() + ";  file = " + file.getAbsolutePath() );
    final byte[] transformedBytes = transformer.transform(
        getClass().getClassLoader(),
        descriptor.getName(),
        null,
        null,
        descriptor.getBytes()
View Full Code Here


            if ( !entry.isDirectory() ) {
              // see if the entry represents a class file
              final DataInputStream din = new DataInputStream( new ByteArrayInputStream( byteCode ) );
              if ( din.readInt() == CLASS_MAGIC ) {
                final ClassDescriptor descriptor = getClassDescriptor( byteCode );
                final ClassTransformer transformer = getClassTransformer( descriptor, classNames );
                if ( transformer == null ) {
                  logger.debug( "no transformer for zip entry :  " + entry.toString() );
                }
                else {
                  logger.info( "processing class : " + descriptor.getName() + ";  entry = " + file.getAbsolutePath() );
                  byteCode = transformer.transform(
                      getClass().getClassLoader(),
                      descriptor.getName(),
                      null,
                      null,
                      descriptor.getBytes()
View Full Code Here

   * @throws Exception Indicates an issue either access files or applying the transformations.
   */
  protected void processClassFile(File file, Set<String> classNames) throws Exception {
    byte[] bytes = ByteCodeHelper.readByteCode( file );
    ClassDescriptor descriptor = getClassDescriptor( bytes );
    ClassTransformer transformer = getClassTransformer( descriptor, classNames );
    if ( transformer == null ) {
      logger.debug( "no trasformer for class file : " + file.getAbsolutePath() );
      return;
    }

    logger.info( "processing class : " + descriptor.getName() + ";  file = " + file.getAbsolutePath() );
    byte[] transformedBytes = transformer.transform(
        getClass().getClassLoader(),
        descriptor.getName(),
        null,
        null,
        descriptor.getBytes()
View Full Code Here

                if ( !entry.isDirectory() ) {
                  // see if the entry represents a class file
                  DataInputStream din = new DataInputStream( new ByteArrayInputStream( byteCode ) );
                  if ( din.readInt() == CLASS_MAGIC ) {
                    ClassDescriptor descriptor = getClassDescriptor( byteCode );
                    ClassTransformer transformer = getClassTransformer( descriptor, classNames );
                    if ( transformer == null ) {
                      logger.debug( "no transformer for zip entry :  " + entry.toString() );
                    }
                    else {
                      logger.info( "processing class : " + descriptor.getName() + ";  entry = " + file.getAbsolutePath() );
                      byteCode = transformer.transform(
                          getClass().getClassLoader(),
                          descriptor.getName(),
                          null,
                          null,
                          descriptor.getBytes()
View Full Code Here

   * @throws Exception Indicates an issue either access files or applying the transformations.
   */
  protected void processClassFile(File file, Set<String> classNames) throws Exception {
    byte[] bytes = ByteCodeHelper.readByteCode( file );
    ClassDescriptor descriptor = getClassDescriptor( bytes );
    ClassTransformer transformer = getClassTransformer( descriptor, classNames );
    if ( transformer == null ) {
      logger.debug( "no trasformer for class file : " + file.getAbsolutePath() );
      return;
    }

    logger.info( "processing class : " + descriptor.getName() + ";  file = " + file.getAbsolutePath() );
    byte[] transformedBytes = transformer.transform(
        getClass().getClassLoader(),
        descriptor.getName(),
        null,
        null,
        descriptor.getBytes()
View Full Code Here

                if ( !entry.isDirectory() ) {
                  // see if the entry represents a class file
                  DataInputStream din = new DataInputStream( new ByteArrayInputStream( byteCode ) );
                  if ( din.readInt() == CLASS_MAGIC ) {
                    ClassDescriptor descriptor = getClassDescriptor( byteCode );
                    ClassTransformer transformer = getClassTransformer( descriptor, classNames );
                    if ( transformer == null ) {
                      logger.debug( "no transformer for zip entry :  " + entry.toString() );
                    }
                    else {
                      logger.info( "processing class : " + descriptor.getName() + ";  entry = " + file.getAbsolutePath() );
                      byteCode = transformer.transform(
                          getClass().getClassLoader(),
                          descriptor.getName(),
                          null,
                          null,
                          descriptor.getBytes()
View Full Code Here

TOP

Related Classes of org.hibernate.bytecode.spi.ClassTransformer

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.