Returns the scanner compat object
@return scanner implementation
497588
@NonNull
	public synchronized static BluetoothLeScannerCompat getScanner() {
		if (instance != null)
			return instance;
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
			return instance = new BluetoothLeScannerImplOreo();
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
			return instance = new BluetoothLeScannerImplMarshmallow();
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
			return instance = new BluetoothLeScannerImplLollipop();
		return instance = new BluetoothLeScannerImplJB();
	}
471575
public function getCommonPrefix()
    {
        if ($this->count() == 0) {
            return null;
        }

        $commonPath = $this->reduce(function ($commonPath, FileNodeInterface $file) {
            if (is_null($commonPath)) {
                return $file->getPath();
            }
            return $this->getCommonPrefixString($commonPath, $file->getPath());
        });

        return (strlen($commonPath) > 0) ? $commonPath : null;
    }
995183
public function getIterator()
    {
        if (is_null($this->iterator)) {
            $finder = $this->finderFactory->createFinder();
            $finder->files()->in($this->path);

            if (false === empty($this->extensions)) {
                $finder->name($this->getExtensionsRegex());
            }

            $this->iterator = $finder->getIterator();
        }

        return $this->iterator;
    }
1307956
public function process()
    {
        $this->_setEscaper();
        $comparison = $this->getConfig('comparison');
        $valueMode = $this->getConfig('valueMode');
        $value = $this->value();
        $isMultiValue = is_array($value);

        $conditions = [];
        foreach ($this->fields() as $field) {
            $left = $field . ' ' . $comparison;
            if ($isMultiValue) {
                $valueConditions = [];
                foreach ($value as $val) {
                    $right = $this->_wildcards($val);
                    if ($right !== false) {
                        $valueConditions[] = [$left => $right];
                    }
                }
                if (!empty($valueConditions)) {
                    $conditions[] = [$valueMode => $valueConditions];
                }
            } else {
                $right = $this->_wildcards($value);
                if ($right !== false) {
                    $conditions[] = [$left => $right];
                }
            }
        }

        if (!empty($conditions)) {
            $colTypes = $this->getConfig('colType');
            if ($colTypes) {
                $colTypes = $this->_aliasColTypes($colTypes);
            }

            $this->getQuery()->andWhere([$this->getConfig('fieldMode') => $conditions], $colTypes);

            return true;
        }

        return false;
    }
915823
public static function getDecimalSeparator()
    {
        if (!isset(self::$decimalSeparator)) {
            $localeconv = localeconv();
            self::$decimalSeparator = ($localeconv['decimal_point'] != '')
                ? $localeconv['decimal_point'] : $localeconv['mon_decimal_point'];

            if (self::$decimalSeparator == '') {
                // Default to .
                self::$decimalSeparator = '.';
            }
        }
        return self::$decimalSeparator;
    }
1016136
public static HadoopCompat getCompat() {
        String ver = VersionInfo.getVersion();

        log.debug("Read Hadoop VersionInfo string {}", ver);

        final String pkgName = HadoopCompatLoader.class.getPackage().getName();
        final String className;

        if (ver.startsWith("1.")) {
            className = pkgName + ".h1.Hadoop1Compat";
        } else {
            className = pkgName + ".h2.Hadoop2Compat";
        }

        log.debug("Attempting to load class {} and instantiate with nullary constructor", className);
        try {
            Constructor<?> ctor = Class.forName(className).getConstructor();
            log.debug("Invoking constructor {}", ctor);
            return (HadoopCompat)ctor.newInstance();
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (SecurityException e) {
            throw new RuntimeException(e);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
883391
public function generate()
    {
        $reference = [];

        $scanner = $this->getScanner();

        /** @var  $class ClassScanner */
        foreach ($scanner->getClasses() as $class) {
            $footprint = $this->getClassFootprint($class);
            $reference[$class->getName()] = $footprint->export();
        }
        $reference = json_encode($reference);

        return $reference;
    }
631157
public function getComparableString()
    {
        if ($this->comparableString === null) {
            $chunks = array();
            foreach ($this->getBytes() as $byte) {
                $chunks[] = sprintf('%03d', $byte);
            }
            $this->comparableString = implode('.', $chunks);
        }

        return $this->comparableString;
    }
1063741
protected function getEmbeddedRegexp()
    {
        // we need to alter the regexp we usr for std ref resolving, as it will be used to match parts of text, not the whole string
        $regexp = substr($this->getRegexp(), 1, -1);
        return '/' . preg_quote($this->beginToken). preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/';
    }
802490
public function scans()
    {
        if (is_null($this->scanRequests)) {
            $this->scanRequests = new ScanRequests($this->client);
        }

        return $this->scanRequests;
    }
1130998
public function getRegex()
    {
        if (null === $this->constraint) {
            $delim = $this->next instanceof Delimiter ? (string)$this->next : '';
            $this->constraint = sprintf('[^%s%s]++', preg_quote($this->default, ParserInterface::EXP_DELIM), $delim);
        }

        return $this->regex = sprintf('(?P<%s>%s)', $this->value, $this->constraint);
    }
205184
public Set<Class<?>> scan() {
		for (URL url : ResourceUtil.getResourceIter(this.packagePath)) {
			switch (url.getProtocol()) {
			case "file":
				scanFile(new File(URLUtil.decode(url.getFile(), this.charset.name())), null);
				break;
			case "jar":
				scanJar(URLUtil.getJarFile(url));
				break;
			}
		}
		
		if(CollUtil.isEmpty(this.classes)) {
			scanJavaClassPaths();
		}
		
		return Collections.unmodifiableSet(this.classes);
	}
970742
public static function getDecimalSeparator()
	{
		if (!isset(self::$_decimalSeparator)) {
			$localeconv = localeconv();
			self::$_decimalSeparator = ($localeconv['decimal_point'] != '')
				? $localeconv['decimal_point'] : $localeconv['mon_decimal_point'];

			if (self::$_decimalSeparator == '') {
				// Default to .
				self::$_decimalSeparator = '.';
			}
		}
		return self::$_decimalSeparator;
	}
260407
public function scan()
    {
        $paths = $this->getScanPaths();

        $components = [];

        foreach ($paths as $key => $path) {
            $manifests = $this->app['files']->glob("{$path}/component.json");

            is_array($manifests) || $manifests = [];

            foreach ($manifests as $manifest) {
                $name = Json::make($manifest)->get('name');

                $components[$name] = new Component($this->app, $name, dirname($manifest));
            }
        }

        return $components;
    }
1013115
public function getMapper()
    {
        $map = $this->getMap();

        return function ($path) use ($map) {
            foreach ($map as $item) {
                foreach ($item as $match => $replace) {
                    if (empty($match)) {
                        return $replace . $path;
                    } elseif (0 === strpos($path, $match)) {
                        return preg_replace(
                            '/^' . preg_quote($match, '/') . '/',
                            $replace,
                            $path
                        );
                    }
                }
            }

            return null;
        };
    }
544363
public static ScannerFactory instance(Context context) {
        ScannerFactory instance = context.get(scannerFactoryKey);
        if (instance == null)
            instance = new ScannerFactory(context);
        return instance;
    }
970268
protected function compile()
	{
		if ($this->compiled !== false)
		{
			return $this->compiled;
		}

		if ($this->isStatic())
		{
			$this->compiled = '~^'.$this->pattern.'$~';
			return $this->compiled;
		}

		$compiled = $this->pattern;
		foreach ($this->getSegments($compiled) as $segment)
		{
			$compiled = \str_replace($segment['token'], $segment['regex'], $compiled);
		}

		$this->compiled = "~^{$compiled}$~";
		return $this->compiled;
	}