本文整理汇总了Java中net.sf.launch4j.binding.Validator.checkFile方法的典型用法代码示例。如果您正苦于以下问题:Java Validator.checkFile方法的具体用法?Java Validator.checkFile怎么用?Java Validator.checkFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.launch4j.binding.Validator
的用法示例。
在下文中一共展示了Validator.checkFile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkInvariants
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void checkInvariants() {
Validator.checkTrue(outfile != null && outfile.getPath().endsWith(".exe"),
"outfile", Messages.getString("Config.specify.output.exe"));
if (dontWrapJar) {
if (jar != null && !jar.getPath().equals("")) {
Validator.checkRelativeWinPath(jar.getPath(), "jar",
Messages.getString("Config.application.jar.path"));
} else {
Validator.checkTrue(classPath != null, "classPath",
Messages.getString("ClassPath.or.jar"));
}
} else {
Validator.checkFile(jar, "jar",
Messages.getString("Config.application.jar"));
}
if (!Validator.isEmpty(chdir)) {
Validator.checkRelativeWinPath(chdir, "chdir",
Messages.getString("Config.chdir.relative"));
Validator.checkFalse(chdir.toLowerCase().equals("true")
|| chdir.toLowerCase().equals("false"),
"chdir", Messages.getString("Config.chdir.path"));
}
Validator.checkOptFile(manifest, "manifest", Messages.getString("Config.manifest"));
Validator.checkOptFile(icon, "icon", Messages.getString("Config.icon"));
Validator.checkOptString(cmdLine, Validator.MAX_BIG_STR, "jarArgs",
Messages.getString("Config.jar.arguments"));
Validator.checkOptString(errTitle, Validator.MAX_STR, "errTitle",
Messages.getString("Config.error.title"));
Validator.checkOptString(downloadUrl, 256,
"downloadUrl", Messages.getString("Config.download.url"));
Validator.checkOptString(supportUrl, 256,
"supportUrl", Messages.getString("Config.support.url"));
Validator.checkIn(getHeaderType(), HEADER_TYPES, "headerType",
Messages.getString("Config.header.type"));
Validator.checkFalse(getHeaderType().equals(CONSOLE_HEADER) && splash != null,
"headerType",
Messages.getString("Config.splash.not.impl.by.console.hdr"));
Validator.checkOptStrings(variables,
Validator.MAX_ARGS,
Validator.MAX_ARGS,
"[^=%\t]+=[^=\t]+",
"variables",
Messages.getString("Config.variables"),
Messages.getString("Config.variables.err"));
Validator.checkIn(getPriority(), PRIORITY_CLASS_NAMES, "priority",
Messages.getString("Config.priority"));
jre.checkInvariants();
}
示例2: checkInvariants
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void checkInvariants() {
Validator.checkFile(file, "splash.file",
Messages.getString("Splash.splash.file"));
Validator.checkRange(timeout, 1, 60 * 15, "splash.timeout",
Messages.getString("Splash.splash.timeout"));
}
示例3: checkInvariants
import net.sf.launch4j.binding.Validator; //导入方法依赖的package包/类
public void checkInvariants() {
Validator.checkTrue(outfile != null && outfile.getPath().endsWith(".exe"),
"outfile", Messages.getString("Config.specify.output.exe"));
if (dontWrapJar) {
if (jar != null && !jar.getPath().equals("")) {
Validator.checkRelativeWinPath(jar.getPath(), "jar",
Messages.getString("Config.application.jar.path"));
} else {
Validator.checkTrue(classPath != null, "classPath",
Messages.getString("ClassPath.or.jar"));
}
} else {
Validator.checkFile(jar, "jar",
Messages.getString("Config.application.jar"));
}
if (!Validator.isEmpty(chdir)) {
Validator.checkRelativeWinPath(chdir, "chdir",
Messages.getString("Config.chdir.relative"));
Validator.checkFalse(chdir.toLowerCase().equals("true")
|| chdir.toLowerCase().equals("false"),
"chdir", Messages.getString("Config.chdir.path"));
}
Validator.checkOptFile(manifest, "manifest", Messages.getString("Config.manifest"));
Validator.checkOptFile(icon, "icon", Messages.getString("Config.icon"));
Validator.checkOptString(cmdLine, Validator.MAX_BIG_STR, "jarArgs",
Messages.getString("Config.jar.arguments"));
Validator.checkOptString(errTitle, Validator.MAX_STR, "errTitle",
Messages.getString("Config.error.title"));
Validator.checkOptString(downloadUrl, 256,
"downloadUrl", Messages.getString("Config.download.url"));
Validator.checkOptString(supportUrl, 256,
"supportUrl", Messages.getString("Config.support.url"));
Validator.checkIn(getHeaderType(), HEADER_TYPES, "headerType",
Messages.getString("Config.header.type"));
Validator.checkFalse(!isGuiApplication() && splash != null,
"headerType",
Messages.getString("Config.splash.not.impl.by.console.hdr"));
Validator.checkOptStrings(variables,
Validator.MAX_ARGS,
Validator.MAX_ARGS,
"[^=%\t]+=[^=\t]+",
"variables",
Messages.getString("Config.variables"),
Messages.getString("Config.variables.err"));
Validator.checkIn(getPriority(), PRIORITY_CLASS_NAMES, "priority",
Messages.getString("Config.priority"));
checkJniInvariants();
jre.checkInvariants();
}