当前位置: 首页>>代码示例>>Java>>正文


Java Validator.checkRelativeWinPath方法代码示例

本文整理汇总了Java中net.sf.launch4j.binding.Validator.checkRelativeWinPath方法的典型用法代码示例。如果您正苦于以下问题:Java Validator.checkRelativeWinPath方法的具体用法?Java Validator.checkRelativeWinPath怎么用?Java Validator.checkRelativeWinPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.launch4j.binding.Validator的用法示例。


在下文中一共展示了Validator.checkRelativeWinPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
 
开发者ID:clidev,项目名称:spike.x,代码行数:49,代码来源:Config.java

示例2: 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();
}
 
开发者ID:beast-dev,项目名称:beast-mcmc,代码行数:50,代码来源:Config.java


注:本文中的net.sf.launch4j.binding.Validator.checkRelativeWinPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。