public interface FileResolver
<p>Defines a strategy for resolving a file.</p>
| Modifier and Type | Method and Description |
|---|---|
<D extends FileDescriptor> |
match(String containedPath,
Class<D> type,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Match an existing descriptor in the store and return it with as the given
type if it exists.
|
<D extends FileDescriptor> |
require(String requiredPath,
Class<D> type,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Resolve an existing descriptor from the given information.
|
<D extends FileDescriptor> |
require(String requiredPath,
String containedPath,
Class<D> type,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Resolve an existing file descriptor for the given paths.
|
<D extends FileDescriptor> D require(String requiredPath, String containedPath, Class<D> type, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Resolve an existing file descriptor for the given paths. <p> This is usually done by evaluating the given path, e.g. if a path "com/buschmais/Test.class" is given a class file resolver might return an existing class descriptor with the fully qualified name "com.buschmais.Test" which has been created before as a referenced class.</p>
requiredPath - The path of the file to require, e.g. /com/acme/Example.classcontainedPath - The internal path (e.g. within the the same artifact if
applicable), e.g. /WEB-INF/classes/com/acme/Example.classtype - The file descriptor type.context - The scanner context.<D extends FileDescriptor> D require(String requiredPath, Class<D> type, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Resolve an existing descriptor from the given information.
<p>
This is a convenience method delegating to
require(String, Class, ScannerContext) using the value of path
also as mappedPath.</p>
D - The expected file descriptor type.requiredPath - The path of the file to require, e.g. /com/acme/Example.classtype - The file descriptor type.context - The scanner context.<D extends FileDescriptor> D match(String containedPath, Class<D> type, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Match an existing descriptor in the store and return it with as the given type if it exists. <p> Example: A Java class might exist with a fully qualified name in the database. The implementation of this method should check if the given path can be transformed into a class name (i.e. replacing '/' with '.') that already exists as descriptor (i.e. node) and return it.</p>
D - The expected type.containedPath - The path.type - The expected type.context - The scanner context.Copyright © 2016–2021 jQAssistant Development Team. All rights reserved.