All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.plantuml.SourceFileReaderHardFile Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml;

import java.io.File;
import java.io.IOException;
import java.util.List;

import net.sourceforge.plantuml.file.SuggestedFile;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.security.SFile;

public class SourceFileReaderHardFile extends SourceFileReaderAbstract implements ISourceFileReader {
	// ::remove file when __CORE__
	// ::remove file when __HAXE__

	private final File outputFile;

	public SourceFileReaderHardFile(Defines defines, final File file, File outputFile, List config,
			String charset, FileFormatOption fileFormatOption) throws IOException {
		super(file, fileFormatOption, defines, config, charset);
		this.outputFile = outputFile;
		FileSystem.getInstance().setCurrentDir(SFile.fromFile(file.getAbsoluteFile().getParentFile()));
	}

	@Override
	protected SuggestedFile getSuggestedFile(BlockUml blockUml) {
		final SuggestedFile suggested = SuggestedFile.fromOutputFile(outputFile, getFileFormatOption().getFileFormat());
		return suggested;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy