public class Utils
extends java.lang.Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteFile(java.lang.String name) |
static boolean |
endsWith(java.lang.String[] result,
java.lang.String... args)
given a parseFileName array ["x","y","z","q","r"], endsWith returns true
if its 2nd argument matches the postfix of the input array; ex args =
["q","r"] will return true;
see UtilsTest for examples
|
static java.lang.String |
getExt(java.lang.String[] lst) |
static java.lang.String |
getName(java.lang.String[] lst) |
static java.lang.String |
getSchema(java.lang.String[] lst) |
static java.lang.String |
M4Home()
MDELite is distributed in a Jar, which is placed somewhere on a client's
disk.
|
static void |
main(java.lang.String... args) |
static java.lang.String |
makeString(java.lang.String explanation,
java.lang.Object... args)
converts explanation, where 2+char tokens that are UPPERCASE are replaced
with "%s"; the args fill in these as strings
|
static java.lang.String[] |
parameterize(java.lang.String explanation)
parameterize trims an explanation and then splits it into an array of
strings.
|
static java.lang.String[] |
parseFileName(java.lang.String filename)
a filename is "x#y#z.q.r", where # denotes a windows (\) or unix (/)
directory marker, and "." denotes the usual "dot" in file names This
method returns a string array of a parsed file; in this case it would
return ["x","y","z","q","r"].
|
static java.lang.String |
shortFileName(java.lang.String longFileName) |
public static java.lang.String M4Home()
public static void main(java.lang.String... args)
public static java.lang.String makeString(java.lang.String explanation, java.lang.Object... args)
explanation
- -- Error of message in explanation formargs
- -- sequence of String argumentspublic static java.lang.String[] parameterize(java.lang.String explanation)
explanation
- - is a parameterized message stringpublic static java.lang.String[] parseFileName(java.lang.String filename)
filename
- -- name of file to examinepublic static java.lang.String shortFileName(java.lang.String longFileName)
longFileName
- -- a path to a file, with "/" separatorspublic static boolean endsWith(java.lang.String[] result, java.lang.String... args)
result
- -- string array produced by parseFileNameargs
- -- a list of strings to match with the end of resultpublic static java.lang.String getName(java.lang.String[] lst)
lst
- -- list ending with name, schema, extpublic static java.lang.String getExt(java.lang.String[] lst)
lst
- -- list ending with name, schema, extpublic static java.lang.String getSchema(java.lang.String[] lst)
lst
- -- list ending with name, schema, extpublic static void deleteFile(java.lang.String name)