1 package org.ozoneDB.tools.OPP.srcgen.streamfactory; 9 10 import org.ozoneDB.tools.OPP.OPPHelper; 11 12 import java.io.File ; 13 14 18 public abstract class FileBasedStreamFactory { 19 private File directory; 20 private String extension; 21 private String postFix; 22 23 protected File getFile(String className) { 24 File file = new File (directory, OPPHelper.classFileBasename(className) + postFix + "." + extension); 25 return file; 26 } 27 28 protected String getFileName(String className) { 29 return getFile(className).toString(); 30 } 31 32 public FileBasedStreamFactory(File directory, String extension) { 33 this(directory, extension, ""); 34 } 35 36 public FileBasedStreamFactory(File directory, String extension, String postFix) { 37 this.directory = directory; 38 this.extension = extension; 39 this.postFix = postFix; 40 } 41 } 42 | Popular Tags |