Examples of NativeScanner


Examples of org.hibernate.ejb.packaging.NativeScanner

      {
         Scanner scanner = HackCEMFBuilder.getScanner();
         if (scanner != null)
            delegate = scanner;
         else
            delegate = new NativeScanner();
      }
      return delegate;
   }
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      catch ( IllegalAccessException e ) {
        throw new PersistenceException"Unable to load Scanner class: " + scannerClass, e );
      }
    }
    else {
      return new NativeScanner();
    }
  }
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      catch ( IllegalAccessException e ) {
        throw new PersistenceException"Unable to load Scanner class: " + scannerClass, e );
      }
    }
    else {
      return new NativeScanner();
    }
  }
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      catch ( IllegalAccessException e ) {
        throw new PersistenceException"Unable to load Scanner class: " + scannerClass, e );
      }
    }
    else {
      return new NativeScanner();
    }
  }
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      }
    }
  }

  private NativeScanner buildScanner() {
    return new NativeScanner();
  }
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      catch ( IllegalAccessException e ) {
        throw new PersistenceException"Unable to load Scanner class: " + scannerClass, e );
      }
    }
    else {
      return new NativeScanner();
    }
  }
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      }
    }
  }

  private NativeScanner buildScanner() {
    return new NativeScanner();
  }
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

public class ScannerTest extends PackagingTestCase {
  public void testNativeScanner() throws Exception {
    File defaultPar = buildDefaultPar();
    addPackageToClasspath( defaultPar );

    Scanner scanner = new NativeScanner();
    assertEquals( "defaultpar", scanner.getUnqualifiedJarName( defaultPar.toURL() ) );

    Set<Class<? extends Annotation>> annotationsToLookFor = new HashSet<Class<? extends Annotation>>( 3 );
    annotationsToLookFor.add( Entity.class );
    annotationsToLookFor.add( MappedSuperclass.class );
    annotationsToLookFor.add( Embeddable.class );
    final Set<Class<?>> classes = scanner.getClassesInJar( defaultPar.toURL(), annotationsToLookFor );

    assertEquals( 3, classes.size() );
    assertTrue( classes.contains( ApplicationServer.class ) );
    assertTrue( classes.contains( org.hibernate.ejb.test.pack.defaultpar.Version.class ) );

    Set<String> filePatterns = new HashSet<String>( 2 );
    filePatterns.add( "**/*.hbm.xml" );
    filePatterns.add( "META-INF/orm.xml" );
    final Set<NamedInputStream> files = scanner.getFilesInJar( defaultPar.toURL(), filePatterns );

    assertEquals( 2, files.size() );
    for ( NamedInputStream file : files ) {
      assertNotNull( file.getStream() );
      file.getStream().close();
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      catch ( IllegalAccessException e ) {
        throw new PersistenceException( "Unable to load Scanner class: " + scannerClass, e );
      }
    }
    else {
      return new NativeScanner();
    }
}
View Full Code Here

Examples of org.hibernate.ejb.packaging.NativeScanner

      catch ( IllegalAccessException e ) {
        throw new PersistenceException"Unable to load Scanner class: " + scannerClass, e );
      }
    }
    else {
      return new NativeScanner();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.