src/main/java/com/buschmais/jqassistant/plugin/common/api/scanner/AbstractFileResolver.java
@Deprecated
    protected <D extends FileDescriptor> D toFileDescriptor(Descriptor descriptor, Class<D> type, String path, ScannerContext context) {
        if (descriptor == null) {
            D result = context.getStore().create(type);
            result.setFileName(path);
            return result;
        }
        return migrateOrCast(descriptor, type, context);
    }
@Deprecated
    protected <D extends FileDescriptor> D toFileDescriptor(Descriptor descriptor, Class<D> type, String path, ScannerContext context) {
        if (descriptor == null) {
            D result = context.getStore().create(type);
            result.setFileName(path);
            return result;
        }
        return migrateOrCast(descriptor, type, context);
    }
@ Deprecated protected < D extends FileDescriptor > D toFileDescriptor ( Descriptor descriptor , Class < D > type , String path , ScannerContext context ) { if ( descriptor == null ) { D result = context . getStore ( ) . create ( type ) ; result . setFileName ( path ) ; return result ; } return migrateOrCast ( descriptor , type , context ) ; }
Takes an optional descriptor and transforms it to file descriptor.

@param descriptor
The descriptor, if <code>null</code> a new descriptor is created.
@param type
The required type.
@param path
The path (to set as file name).
@param context
The scanner context.
@param <D>
The required type.
@return The file descriptor.
@deprecated migrate to
{@link #getOrCreateAs(String, Class, Function, ScannerContext)}.
Takes an optional descriptor and transforms it to file descriptor .