public EntityManagerImpl(Keyspace keyspace, String[] classpathPrefix) { this(keyspace, new DefaultAnnotationScanner(), classpathPrefix); }
public EntityManagerImpl(Keyspace keyspace, String classpathPrefix) { this(keyspace, new DefaultAnnotationScanner(), classpathPrefix); }
private static AnnotationScanner createScanner(final String classname) { if (classname == null) { return new DefaultAnnotationScanner(); } ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = CassandraPersistenceProvider.class.getClassLoader(); } AnnotationScanner scanner; try { scanner = (AnnotationScanner) loader.loadClass(classname).newInstance(); } catch (Exception e) { scanner = new DefaultAnnotationScanner(); } return scanner; }
@Test public void testScanForAnnotation() { AnnotationScanner scanner = new DefaultAnnotationScanner(); Set<Class<?>> classSet = scanner.scan("me.prettyprint.hom.beans", javax.persistence.Entity.class);