@ 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 .