|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.File
org.multijava.util.Destination
This class represents the destination of the output of one of the
tools included in the project. If a destination is specified on
the command line and the input belongs to a package then the output
should be written to the concatenation of the destination directory
and the package names. If no destination is specified then the
output should be written to the same directory as the input. The
destination parameter from the command line is used to construct an
instance of this. That instance provides File objects (via the
...target() methods) for writing particular
output files.
| Field Summary | |
private boolean |
unspecified
Indicates whether the destination directory was unspecified on the command line. |
| Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
private |
Destination(java.lang.String destination,
boolean unspecified)
|
| Method Summary | |
static Destination |
check(java.lang.String dest)
Establish a new destination based on the command line argument. |
java.io.File |
classFileTargetDirectory(java.lang.String packageName,
java.io.File sourceFile)
Returns the target directory for writing a class file of the given package and source file. |
java.io.File |
textTarget(java.lang.String filename)
Returns the target for a text file, which is simply filename appended to the destination directory. |
| Methods inherited from class java.io.File |
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private boolean unspecified
| Constructor Detail |
private Destination(java.lang.String destination,
boolean unspecified)
| Method Detail |
public static Destination check(java.lang.String dest)
public java.io.File textTarget(java.lang.String filename)
filename appended to the destination directory.
public java.io.File classFileTargetDirectory(java.lang.String packageName,
java.io.File sourceFile)
ensures unspecified && sourceFile != null ==> \result == sourceFile; ensures unspecified && sourceFile == null ==> \result == this; ensures !unspecified ==> \result.equals( new File( this, packageName ));
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||