本文整理了Java中org.apache.tools.ant.taskdefs.Javac.checkParameters()
方法的一些代码示例,展示了Javac.checkParameters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Javac.checkParameters()
方法的具体详情如下:
包路径:org.apache.tools.ant.taskdefs.Javac
类名称:Javac
方法名:checkParameters
[英]Check that all required attributes have been set and nothing silly has been entered.
[中]检查是否已设置所有必需的属性,并且未输入任何内容。
代码示例来源:origin: org.apache.ant/ant
/**
* Executes the task.
* @exception BuildException if an error occurs
*/
@Override
public void execute() throws BuildException {
checkParameters();
resetFileLists();
// scan source directories and dest directory to build up
// compile list
if (hasPath(src)) {
collectFileListFromSourcePath();
} else {
assert hasPath(moduleSourcepath) : "Either srcDir or moduleSourcepath must be given";
collectFileListFromModulePath();
}
compile();
if (updatedProperty != null
&& taskSuccess
&& compileList.length != 0) {
getProject().setNewProperty(updatedProperty, "true");
}
}
代码示例来源:origin: org.glassfish.metro/webservices-tools
@Override
protected void checkParameters() throws BuildException {
super.checkParameters();
if (sourceDestDir == null) {
throw new BuildException("destination source directory must be set", getLocation());
}
if (!sourceDestDir.isDirectory()) {
throw new BuildException("destination source directory \"" + sourceDestDir + "\" does not exist or is not a directory",
getLocation());
}
try {
Matcher matcher = VERSION_PATTERN.matcher(super.getCompilerVersion());
if (matcher.find()) {
float version = Float.valueOf(matcher.group(1));
if (version < 1.6) {
throw new BuildException("Annotation processing task requires Java 1.6+", getLocation());
}
}
} catch (Exception e) {
log("Can't check version for annotation processing task");
}
}
代码示例来源:origin: javaee/metro-jax-ws
@Override
protected void checkParameters() throws BuildException {
super.checkParameters();
if (sourceDestDir == null) {
throw new BuildException("destination source directory must be set", getLocation());
}
if (!sourceDestDir.isDirectory()) {
throw new BuildException("destination source directory \"" + sourceDestDir + "\" does not exist or is not a directory",
getLocation());
}
try {
Matcher matcher = VERSION_PATTERN.matcher(super.getCompilerVersion());
if (matcher.find()) {
float version = Float.valueOf(matcher.group(1));
if (version < 1.6) {
throw new BuildException("Annotation processing task requires Java 1.6+", getLocation());
}
}
} catch (Exception e) {
log("Can't check version for annotation processing task");
}
}
代码示例来源:origin: javaee/metro-jax-ws
@Override
protected void checkParameters() throws BuildException {
super.checkParameters();
if (sourceDestDir == null) {
throw new BuildException("destination source directory must be set", getLocation());
}
if (!sourceDestDir.isDirectory()) {
throw new BuildException("destination source directory \"" + sourceDestDir + "\" does not exist or is not a directory",
getLocation());
}
try {
Matcher matcher = VERSION_PATTERN.matcher(super.getCompilerVersion());
if (matcher.find()) {
float version = Float.valueOf(matcher.group(1));
if (version < 1.6) {
throw new BuildException("Annotation processing task requires Java 1.6+", getLocation());
}
}
} catch (Exception e) {
log("Can't check version for annotation processing task");
}
}
代码示例来源:origin: com.sun.xml.ws/jaxws-tools
@Override
protected void checkParameters() throws BuildException {
super.checkParameters();
if (sourceDestDir == null) {
throw new BuildException("destination source directory must be set", getLocation());
}
if (!sourceDestDir.isDirectory()) {
throw new BuildException("destination source directory \"" + sourceDestDir + "\" does not exist or is not a directory",
getLocation());
}
try {
Matcher matcher = VERSION_PATTERN.matcher(super.getCompilerVersion());
if (matcher.find()) {
float version = Float.valueOf(matcher.group(1));
if (version < 1.6) {
throw new BuildException("Annotation processing task requires Java 1.6+", getLocation());
}
}
} catch (Exception e) {
log("Can't check version for annotation processing task");
}
}
内容来源于网络,如有侵权,请联系作者删除!