APISonar


io.github.lukehutch.fastclasspathscanner.utils.LogNode.log

> io > github > lukehutch > fastclasspathscanner > utils > LogNode > log
io APIs github APIs lukehutch APIs fastclasspathscanner APIs utils APIs LogNode APIs log APIs

Example 1
public void scanPaths(final LogNode log) {
        final String path = classpathEltPath.getResolvedPath();
        String canonicalPath = path;
        try {
            canonicalPath = classpathEltPath.getCanonicalPath(log);
        } catch (final IOException e) {
        }
        final LogNode logNode = log == null ? null
                : log.log(canonicalPath, "Scanning directory classpath entry " + classpathEltPath
                        + (path.equals(canonicalPath) ? "" : " ; canonical path: " + canonicalPath));

        final HashSet<String> scannedCanonicalPaths = new HashSet<>();
        scanDir(dir, dir, /* ignorePrefixLen = */ dir.getPath().length() + 1, /* inWhitelistedPath = */ false,
                scannedCanonicalPaths, logNode);
    }
Example 2
public void matchFilenamePath(final String relativePathToMatch,
            final FileMatchProcessorAny fileMatchProcessor) {
        fileMatchProcessorWrappers.add(new FileMatchProcessorWrapper(new FilePathTester() {
            @Override
            public boolean filePathMatches(final File classpathElt, final String relativePathStr,
                    final LogNode log) {
                final boolean matched = relativePathStr.equals(relativePathToMatch);
                if (matched && log != null) {
                    log.log("Matched filename path " + relativePathToMatch);
                }
                return matched;
            }
        }, fileMatchProcessor));
    }
Example 3
public void handle(final ScanSpec scanSpec, final ClassLoader classLoader,
            final ClasspathOrder classpathOrderOut, final LogNode log) throws Exception {
        // type ClassLoader
        final Object parentContextClassLoader = ReflectionUtils.getFieldVal(classLoader, "parentContextClassLoader",
                false);
        if (parentContextClassLoader != null) {
            final ClassLoaderHandler parentContextClassLoaderHandler = ClasspathFinder
                    .findClassLoaderHandlerForClassLoader(scanSpec, classLoader, log);
            LogNode subLog = log;
            if (log != null) {
                subLog = log.log("Delegating to parentContextClassLoader: " + parentContextClassLoader);
            }
            parentContextClassLoaderHandler.handle(scanSpec, classLoader, classpathOrderOut, subLog);
        }
    }
Example 4
private LogNode log;

    private synchronized ScanSpec getScanSpec() {
        if (scanSpec == null) {
            scanSpec = new ScanSpec(scanSpecArgs, log == null ? null : log.log("Parsing scan spec"));
        }
        return scanSpec;
    }