public BootstrapContextImpl( StandardServiceRegistry serviceRegistry, MetadataBuildingOptions metadataBuildingOptions) { this.serviceRegistry = serviceRegistry; this.classmateContext = new ClassmateContext(); this.metadataBuildingOptions = metadataBuildingOptions; final ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class ); this.classLoaderAccess = new ClassLoaderAccessImpl( classLoaderService ); this.hcannReflectionManager = generateHcannReflectionManager(); final StrategySelector strategySelector = serviceRegistry.getService( StrategySelector.class ); final ConfigurationService configService = serviceRegistry.getService( ConfigurationService.class ); this.jpaCompliance = new MutableJpaComplianceImpl( configService.getSettings(), false ); this.scanOptions = new StandardScanOptions( (String) configService.getSettings().get( AvailableSettings.SCANNER_DISCOVERY ), false ); // ScanEnvironment must be set explicitly this.scannerSetting = configService.getSettings().get( AvailableSettings.SCANNER ); if ( this.scannerSetting == null ) { this.scannerSetting = configService.getSettings().get( AvailableSettings.SCANNER_DEPRECATED ); if ( this.scannerSetting != null ) { DEPRECATION_LOGGER.logDeprecatedScannerSetting(); } } this.archiveDescriptorFactory = strategySelector.resolveStrategy( ArchiveDescriptorFactory.class, configService.getSettings().get( AvailableSettings.SCANNER_ARCHIVE_INTERPRETER ) ); this.typeConfiguration = new TypeConfiguration(); }
@Test public void testContributedBasicType() { TypeConfiguration typeConfiguration = new TypeConfiguration(); typeConfiguration.getJavaTypeDescriptorRegistry().addDescriptor( ValidatingUrlJavaTypeDescriptor.INSTANCE ); typeConfiguration.getBasicTypeRegistry().register( new StandardBasicTypeTemplate<>( VarcharTypeDescriptor.INSTANCE, ValidatingUrlJavaTypeDescriptor.INSTANCE, REG_KEY ) ); final BasicType registeredType = typeConfiguration.getBasicTypeRegistry().getRegisteredType( REG_KEY ); assertThat( registeredType, notNullValue() ); assertTyping( StandardBasicTypeTemplate.class, registeredType ); }
public String asFinderArgumentList(Map<Object,Object> parameterTypes, ImportContext ctx) { StringBuffer buf = new StringBuffer(); Iterator<Entry<Object,Object>> iter = parameterTypes.entrySet().iterator(); TypeResolver typeResolver = new TypeConfiguration().getTypeResolver(); while ( iter.hasNext() ) { Entry<Object,Object> entry = iter.next();
public String asFinderArgumentList(Map<Object,Object> parameterTypes, ImportContext ctx) { StringBuffer buf = new StringBuffer(); Iterator<Entry<Object,Object>> iter = parameterTypes.entrySet().iterator(); TypeResolver typeResolver = new TypeConfiguration().getTypeResolver(); while ( iter.hasNext() ) { Entry<Object,Object> entry = iter.next();
); this.typeConfiguration = new TypeConfiguration();