Package org.hibernate.bytecode

Examples of org.hibernate.bytecode.ClassTransformer


  protected void processClassFile(File file) throws Exception {
    logger.verbose( "Starting class file : " + file.toURL() );
    byte[] bytes = ByteCodeHelper.readByteCode( file );
    ClassDescriptor descriptor = getClassDescriptor( bytes );
    ClassTransformer transformer = getClassTransformer( descriptor );
    if ( transformer == null ) {
      logger.verbose( "skipping file : " + file.toURL() );
      return;
    }

    logger.info( "processing class [" + descriptor.getName() + "]; file = " + file.toURL() );
    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 );
                    if ( transformer == null ) {
                      logger.verbose( "skipping entry : " + entry.toString() );
                    }
                    else {
                      logger.info( "processing class [" + descriptor.getName() + "]; entry = " + file.toURL() );
                      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 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

  protected void processClassFile(File file) throws Exception {
    logger.verbose( "Starting class file : " + file.toURL() );
    byte[] bytes = ByteCodeHelper.readByteCode( file );
    ClassDescriptor descriptor = getClassDescriptor( bytes );
    ClassTransformer transformer = getClassTransformer( descriptor );
    if ( transformer == null ) {
      logger.verbose( "skipping file : " + file.toURL() );
      return;
    }

    logger.info( "processing class [" + descriptor.getName() + "]; file = " + file.toURL() );
    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 );
                    if ( transformer == null ) {
                      logger.verbose( "skipping entry : " + entry.toString() );
                    }
                    else {
                      logger.info( "processing class [" + descriptor.getName() + "]; entry = " + file.toURL() );
                      byteCode = transformer.transform(
                          getClass().getClassLoader(),
                          descriptor.getName(),
                          null,
                          null,
                          descriptor.getBytes()
View Full Code Here

  protected void processClassFile(File file) throws Exception {
    logger.verbose( "Starting class file : " + file.toURL() );
    byte[] bytes = ByteCodeHelper.readByteCode( file );
    ClassDescriptor descriptor = getClassDescriptor( bytes );
    ClassTransformer transformer = getClassTransformer( descriptor );
    if ( transformer == null ) {
      logger.verbose( "skipping file : " + file.toURL() );
      return;
    }

    logger.info( "processing class [" + descriptor.getName() + "]; file = " + file.toURL() );
    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 );
                    if ( transformer == null ) {
                      logger.verbose( "skipping entry : " + entry.toString() );
                    }
                    else {
                      logger.info( "processing class [" + descriptor.getName() + "]; entry = " + file.toURL() );
                      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 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.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.