Register the specified entity scan packages with the system.
@param registry the source registry
@param packageNames the package names to register
184899
public static void register(BeanDefinitionRegistry registry, String... packageNames) {
		Assert.notNull(registry, "Registry must not be null");
		Assert.notNull(packageNames, "PackageNames must not be null");
		register(registry, Arrays.asList(packageNames));
	}
1205968
public void setEntityTypes(java.util.Collection<EntityTypesListItem> entityTypes) {
        if (entityTypes == null) {
            this.entityTypes = null;
            return;
        }

        this.entityTypes = new java.util.ArrayList<EntityTypesListItem>(entityTypes);
    }
580088
public void registerHanders(String packageString) {
		List<String> list = AnnotationDetector.scanAsList(ExceptionHandler.class, packageString);
		for (String handler : list) {
//			System.out.println(handler);						
			JKExceptionHandler<? extends Throwable> newInstance = JKObjectUtil.newInstance(handler);
			Class<? extends Throwable> clas = JKObjectUtil.getGenericParamter(handler);
			setHandler(clas, newInstance);
		}
	}
93024
protected function initRegistryVersions()
    {
        if (isset($this->repoConfig['registry-versions'])) {
            /** @var CompletePackageInterface $package */
            foreach ($this->repoConfig['registry-versions'] as $package) {
                $this->addPackage($package);
            }
        }
    }
236116
private void registerConvertersFromPackage() {

    register(new BigDecimalConverter());
    register(new BigIntegerConverter());
    register(new BooleanConverter());
    register(new ByteConverter());
    register(new DateConverter());
    register(new CharacterConverter());
    register(new DoubleConverter());
    register(new EnumConverter());
    register(new FloatConverter());
    register(new IdentifiableConverter());
    register(new IntegerConverter());
    register(new LongConverter());
    register(new NumberConverter());
    register(new ShortConverter());
    register(new StringConverter());
    register(new URIConverter());
    register(new URLConverter());
  }
925462
public void registerInstallersFromScan(final List<Class<? extends FeatureInstaller>> installers) {
        setScope(ConfigScope.ClasspathScan.getType());
        for (Class<? extends FeatureInstaller> installer : installers) {
            register(ConfigItem.Installer, installer);
        }
        closeScope();
    }
394535
public function checkRegisterRoles($packageId = '', $carrier = '', $isPackage = FALSE)
    {
        $packageSettings           = $this->packageSettings;
        $currentSessionListPackage = $this->getListUserPackageId();
        if (is_array($currentSessionListPackage)) {
            if (in_array($packageId, $currentSessionListPackage)) {
                return TRUE;
            }
            if ($isPackage !== TRUE) {
                foreach ($currentSessionListPackage as $params) {
                    $packageGroup = $packageSettings[$carrier][$params]['category_group'];
                    if (in_array($packageId, $packageGroup)) {
                        return TRUE;
                    }
                }
            }
        }
        if ($isPackage !== TRUE) {
            $packageGroup = $packageSettings[$carrier][$packageId]['category_group'];
            if (in_array($currentSessionListPackage, $packageGroup)) {
                return TRUE;
            }
        }
        if ($packageId == $currentSessionListPackage) {
            return TRUE;
        }

        return FALSE;
    }
999903
public final void setApplicationName(String... applicationNames) {
        synchronized (lock) {
            if (applicationNames == null) {
                serviceProperties.remove(APPLICATION_NAME);
            } else {
                serviceProperties.put(APPLICATION_NAME, applicationNames);
            }

            if (serviceRegistration != null) {
                serviceRegistration.setProperties(serviceProperties);
            }
        }
    }
61281
private static void _register (@Nonnull @Nonempty final String sCountryCode, @Nonnull final EContinent... aContinents)
  {
    final Locale aCountry = CountryCache.getInstance ().getCountry (sCountryCode);
    if (s_aMap.containsKey (aCountry))
      throw new IllegalArgumentException ("Country code '" + sCountryCode + "' is already registered!");
    for (final EContinent eContinent : aContinents)
      s_aMap.putSingle (aCountry, eContinent);
  }
603727
public void setContextKeyNames(java.util.Collection<String> contextKeyNames) {
        if (contextKeyNames == null) {
            this.contextKeyNames = null;
            return;
        }

        this.contextKeyNames = new com.amazonaws.internal.SdkInternalList<String>(contextKeyNames);
    }
478289
protected void setRegisters(int[] registers) {
        this.registers = Arrays.copyOf(registers, registers.length);
        this.length = registers.length;
    }
909663
@SafeVarargs
	public final Set<Class<?>> scan(Class<? extends Annotation>... annotationTypes)
			throws ClassNotFoundException {
		List<String> packages = getPackages();
		if (packages.isEmpty()) {
			return Collections.emptySet();
		}
		ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(
				false);
		scanner.setEnvironment(this.context.getEnvironment());
		scanner.setResourceLoader(this.context);
		for (Class<? extends Annotation> annotationType : annotationTypes) {
			scanner.addIncludeFilter(new AnnotationTypeFilter(annotationType));
		}
		Set<Class<?>> entitySet = new HashSet<>();
		for (String basePackage : packages) {
			if (StringUtils.hasText(basePackage)) {
				for (BeanDefinition candidate : scanner
						.findCandidateComponents(basePackage)) {
					entitySet.add(ClassUtils.forName(candidate.getBeanClassName(),
							this.context.getClassLoader()));
				}
			}
		}
		return entitySet;
	}
474206
public void runPackages(List<String> packages) {
        CitrusAppConfiguration citrusAppConfiguration = new CitrusAppConfiguration();
        citrusAppConfiguration.setIncludes(Optional.ofNullable(includes).orElse(configuration.getIncludes()));
        citrusAppConfiguration.setPackages(packages);
        citrusAppConfiguration.setConfigClass(configuration.getConfigClass());
        citrusAppConfiguration.addDefaultProperties(configuration.getDefaultProperties());
        citrusAppConfiguration.addDefaultProperties(defaultProperties);
        run(citrusAppConfiguration);
    }
863054
public void register(String... packageNames) {
        Collection<Class<? extends Controller>> classes = getControllerClasses(packageNames);
        if (classes.isEmpty()) {
            log.warn("No annotated controllers found in package(s) '{}'", Arrays.toString(packageNames));
            return;
        }

        log.debug("Found {} controller classes in {} package(s)", classes.size(), packageNames.length);

        for (Class<? extends Controller> controllerClass : classes) {
            register(controllerClass);
        }
    }
112079
public static void registerMessageSourceIfNecessary(BeanDefinitionRegistry registry,
            String[] messageBaseNames) {
        if (!ArrayUtils.contains(registry.getBeanDefinitionNames(), MESSAGE_SOURCE_BEAN_NAME)) {
            logger.debug("registerMessageSource  " + ArrayUtils.toString(messageBaseNames));
            GenericBeanDefinition messageSource = new GenericBeanDefinition();
            messageSource.setBeanClass(ReloadableResourceBundleMessageSource.class);
            MutablePropertyValues propertyValues = new MutablePropertyValues();
            propertyValues.addPropertyValue("useCodeAsDefaultMessage", true);
            propertyValues.addPropertyValue("defaultEncoding", "UTF-8"); // properties文件也将使用UTF-8编辑，而非默认的ISO-9959-1
            propertyValues.addPropertyValue("cacheSeconds", 60); // 暂时hardcode! 60
            propertyValues.addPropertyValue("basenames", messageBaseNames);

            messageSource.setPropertyValues(propertyValues);
            registry.registerBeanDefinition(MESSAGE_SOURCE_BEAN_NAME, messageSource);
        }
    }
17520
List<EntityType> putEntitiesInDefaultPackage(
      IntermediateParseResults intermediateResults, String defaultPackageId) {
    Package p = getPackage(intermediateResults, defaultPackageId);
    if (p == null) {
      throw new UnknownPackageException(defaultPackageId);
    }

    List<EntityType> entities = newArrayList();
    for (EntityType entityType : intermediateResults.getEntityTypes()) {
      if (entityType.getPackage() == null) {
        entityType.setId(defaultPackageId + PACKAGE_SEPARATOR + entityType.getId());
        entityType.setPackage(p);
      }
      entities.add(entityType);
    }
    return entities;
  }
1321496
protected void doRegister(String appName, String serviceName, ProviderInfo providerInfo) {

        registerAppInfoOnce(appName);

        if (LOGGER.isInfoEnabled(appName)) {
            LOGGER.infoWithApp(appName, LogCodes.getLog(LogCodes.INFO_ROUTE_REGISTRY_PUB, serviceName));
        }

        PublishServiceRequest publishServiceRequest = new PublishServiceRequest();
        publishServiceRequest.setServiceName(serviceName);
        ProviderMetaInfo providerMetaInfo = new ProviderMetaInfo();
        providerMetaInfo.setProtocol(providerInfo.getProtocolType());
        providerMetaInfo.setSerializeType(providerInfo.getSerializationType());
        providerMetaInfo.setAppName(appName);
        providerMetaInfo.setVersion(VERSION);
        publishServiceRequest.setProviderMetaInfo(providerMetaInfo);

        client.publishService(publishServiceRequest);
    }