Java 类org.hibernate.annotations.common.reflection.java.JavaReflectionManager 实例源码

项目:Hibernate-Search-GenericJPA    文件:StandaloneSearchConfiguration.java   
public StandaloneSearchConfiguration(InstanceInitializer init, Properties properties) {
    this.initializer = init;
    this.classes = new HashMap<>();
    this.properties = properties;
    // default values if nothing was explicitly set
    this.properties.computeIfAbsent(
            "hibernate.search.default.directory_provider", (key) -> {
                LOGGER.info( "defaulting to RAM directory-provider" );
                return "ram";
            }
    );
    this.properties.computeIfAbsent(
            "hibernate.search.lucene_version", (key) -> {
                LOGGER.info( "defaulting to Lucene Version: " + Version.LUCENE_5_3_0.toString() );
                return Version.LUCENE_5_3_0.toString();
            }
    );
    this.reflectionManager = new JavaReflectionManager();
    this.providedServices = new HashMap<>();
    this.classLoaderService = new DefaultClassLoaderService();
}
项目:Hibernate-Search-GenericJPA    文件:MetadataUtil.java   
public static MetadataProvider getDummyMetadataProvider(SearchConfiguration searchConfiguration) {
    ConfigContext configContext = new ConfigContext(
            searchConfiguration, new BuildContext() {

        @Override
        public ExtendedSearchIntegrator getUninitializedSearchIntegrator() {
            return null;
        }

        @Override
        public String getIndexingStrategy() {
            return IndexingMode.EVENT.toExternalRepresentation();
        }

        @Override
        public IndexingMode getIndexingMode() {
            return IndexingMode.EVENT;
        }

        @Override
        public ServiceManager getServiceManager() {
            return new StandardServiceManager( searchConfiguration, this, Environment.DEFAULT_SERVICES_MAP );
        }

        @Override
        public IndexManagerHolder getAllIndexesManager() {
            return new IndexManagerHolder();
        }

        @Override
        public ErrorHandler getErrorHandler() {
            return new LogErrorHandler();
        }

    }
    );
    return new AnnotationMetadataProvider( new JavaReflectionManager(), configContext );
}
项目:lams    文件:Configuration.java   
private void createReflectionManager(MetadataProvider metadataProvider) {
    reflectionManager = new JavaReflectionManager();
    ( ( MetadataProviderInjector ) reflectionManager ).setMetadataProvider( metadataProvider );
}
项目:hyperjaxb3    文件:JavaReflectionManagerTest.java   
public void testXClass() throws Exception {

        final JavaReflectionManager manager = new JavaReflectionManager();
        final XClass cClass = manager.toXClass(Test.class);

        cClass.getDeclaredProperties(XClass.ACCESS_FIELD);
        cClass.getDeclaredProperties(XClass.ACCESS_PROPERTY);

    }