public abstract class AbstractFileResolver extends Object implements FileResolver
<p>Abstract base class for FileResolvers.
<p>
Provides utility functionality.</p>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFileResolver(String cacheKey)
<p>Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected <D extends FileDescriptor> |
getOrCreateAs(String path,
Class<D> type,
Function<String,FileDescriptor> resolveExisting,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Get an existing
FileDescriptor or create a new one. |
<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.
|
protected <D extends FileDescriptor> |
toFileDescriptor(com.buschmais.jqassistant.core.store.api.model.Descriptor descriptor,
Class<D> type,
String path,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmatch, requireprotected AbstractFileResolver(String cacheKey)
<p>Constructor.</p>
cacheKey - The cache key to use for the store.public <D extends FileDescriptor> D require(String requiredPath, Class<D> type, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
FileResolver<p>Resolve an existing descriptor from the given information.
<p>
This is a convenience method delegating to
FileResolver.require(String, Class, ScannerContext) using the value of path
also as mappedPath.</p>
require in interface FileResolverD - 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.@Deprecated protected <D extends FileDescriptor> D toFileDescriptor(com.buschmais.jqassistant.core.store.api.model.Descriptor descriptor, Class<D> type, String path, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
getOrCreateAs(String, Class, Function, ScannerContext).<p>Takes an optional descriptor and transforms it to file descriptor.</p>
D - The required type.descriptor - The descriptor, if <code>null</code> a new descriptor is created.type - The required type.path - The path (to set as file name).context - The scanner context.protected <D extends FileDescriptor> D getOrCreateAs(String path, Class<D> type, Function<String,FileDescriptor> resolveExisting, com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Get an existing FileDescriptor or create a new one. If an existing
FileDescriptor exists it will be migrated on demand.</p>
D - The requested type.path - The path.type - The requested type.resolveExisting - A Function to resolve an existing FileDescriptor.context - The ScannerContext.FileDescriptor.Copyright © 2016–2021 jQAssistant Development Team. All rights reserved.