本文整理汇总了Java中org.apache.tools.ant.types.Environment类的典型用法代码示例。如果您正苦于以下问题:Java Environment类的具体用法?Java Environment怎么用?Java Environment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Environment类属于org.apache.tools.ant.types包,在下文中一共展示了Environment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CommandLineCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
protected CommandLineCompiler(String command, String identifierArg,
String[] sourceExtensions, String[] headerExtensions,
String outputSuffix, boolean libtool,
CommandLineCompiler libtoolCompiler, boolean newEnvironment,
Environment env) {
super(sourceExtensions, headerExtensions, outputSuffix);
this.command = command;
if (libtool && libtoolCompiler != null) {
throw new java.lang.IllegalArgumentException(
"libtoolCompiler should be null when libtool is true");
}
this.libtool = libtool;
this.libtoolCompiler = libtoolCompiler;
this.identifierArg = identifierArg;
this.newEnvironment = newEnvironment;
this.env = env;
}
示例2: setCommonOptions
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* these are options common to signing and verifying
* @param cmd command to configure
*/
protected void setCommonOptions(final ExecTask cmd) {
if (maxMemory != null) {
addValue(cmd, "-J-Xmx" + maxMemory);
}
if (verbose) {
addValue(cmd, "-verbose");
}
if (strict) {
addValue(cmd, "-strict");
}
//now patch in all system properties
for (Environment.Variable variable : sysProperties.getVariablesVector()) {
declareSysProperty(cmd, variable);
}
}
示例3: changeEnvironment
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
public Processor changeEnvironment(boolean newEnvironment, Environment env) {
if (newEnvironment || env != null) {
return new IntelLinux32CCompiler(getLibtool(),
(IntelLinux32CCompiler) getLibtoolCompiler(),
newEnvironment, env);
}
return this;
}
示例4: changeEnvironment
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
public Processor changeEnvironment(boolean newEnvironment, Environment env) {
if (newEnvironment || env != null) {
return new IntelLinux64CCompiler(getLibtool(),
(IntelLinux64CCompiler) this.getLibtoolCompiler(),
newEnvironment, env);
}
return this;
}
示例5: GccCCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Private constructor. Use GccCCompiler.getInstance() to get singleton
* instance of this class.
*/
private GccCCompiler(String command, String[] sourceExtensions,
String[] headerExtensions, boolean isLibtool,
GccCCompiler libtoolCompiler, boolean newEnvironment,
Environment env) {
super(command, null, sourceExtensions, headerExtensions, isLibtool,
libtoolCompiler, newEnvironment, env);
isPICMeaningful = System.getProperty("os.name").indexOf("Windows") < 0;
}
示例6: changeEnvironment
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
public Processor changeEnvironment(boolean newEnvironment, Environment env) {
if (newEnvironment || env != null) {
return new GccCCompiler(getCommand(), this.getSourceExtensions(),
this.getHeaderExtensions(), this.getLibtool(),
(GccCCompiler) this.getLibtoolCompiler(), newEnvironment,
env);
}
return this;
}
示例7: GccCompatibleCCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Private constructor. Use GccCCompiler.getInstance() to get singleton
* instance of this class.
*/
protected GccCompatibleCCompiler(String command, String identifierArg,
boolean libtool, GccCompatibleCCompiler libtoolCompiler,
boolean newEnvironment, Environment env) {
super(command, identifierArg, sourceExtensions, headerExtensions,
libtool ? ".fo" : ".o", libtool, libtoolCompiler,
newEnvironment, env);
}
示例8: aCCCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Private constructor. Use GccCCompiler.getInstance() to get singleton
* instance of this class.
*/
private aCCCompiler(String command, String[] sourceExtensions,
String[] headerExtensions, boolean newEnvironment,
Environment env) {
super(command, "-help", sourceExtensions, headerExtensions, false,
null, newEnvironment, env);
}
示例9: VisualAgeCCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Private constructor. Use getInstance() to get singleton instance of this
* class.
*/
private VisualAgeCCompiler(String command, String[] sourceExtensions,
String[] headerExtensions, boolean newEnvironment,
Environment env) {
super(command, "-help", sourceExtensions, headerExtensions, false,
null, newEnvironment, env);
}
示例10: OpenWatcomFortranCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Constructor.
* @param command String command
* @param newEnvironment boolean use new environment
* @param env Environment environment
*/
private OpenWatcomFortranCompiler(final String command,
final boolean newEnvironment,
final Environment env) {
super(command, "/?",
new String[] {".f90", ".for", ".f"}
,
new String[] {".i", ".i90", ".fpp"}
,
newEnvironment, env);
}
示例11: OpenWatcomCCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Constructor.
* @param command String command
* @param newEnvironment boolean use new environment
* @param env Environment environment
*/
private OpenWatcomCCompiler(final String command,
final boolean newEnvironment,
final Environment env) {
super(command, "/?",
new String[] {".c", ".cc", ".cpp", ".cxx", ".c++"}
,
new String[] {".h", ".hpp", ".inl"}
,
newEnvironment, env);
}
示例12: OpenWatcomCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Constructor.
* @param command String command
* @param identifierArg String identifier
* @param sourceExtensions String[] source extension
* @param headerExtensions String[] header extension
* @param newEnvironment boolean use new enviroment
* @param env Environment environment
*/
protected OpenWatcomCompiler(final String command,
final String identifierArg,
final String[] sourceExtensions,
final String[] headerExtensions,
final boolean newEnvironment,
final Environment env) {
super(command, identifierArg, sourceExtensions,
headerExtensions, ".obj", false,
null, newEnvironment, env);
}
示例13: runCommand
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* This method is exposed so test classes can overload and test the
* arguments without actually spawning the compiler
*/
public static int runCommand(CCTask task, File workingDir,
String[] cmdline, boolean newEnvironment, Environment env)
throws BuildException {
try {
task.log(Commandline.toString(cmdline), Project.MSG_VERBOSE);
Execute exe = new Execute(new LogStreamHandler(task,
Project.MSG_INFO, Project.MSG_ERR));
if (System.getProperty("os.name").equals("OS/390"))
exe.setVMLauncher(false);
exe.setAntRun(task.getProject());
exe.setCommandline(cmdline);
exe.setWorkingDirectory(workingDir);
if (env != null) {
String[] environment = env.getVariables();
if (environment != null) {
for (int i = 0; i < environment.length; i++) {
task.log("Setting environment variable: "
+ environment[i], Project.MSG_VERBOSE);
}
}
exe.setEnvironment(environment);
}
exe.setNewenvironment(newEnvironment);
return exe.execute();
} catch (java.io.IOException exc) {
throw new BuildException("Could not launch " + cmdline[0] + ": "
+ exc, task.getLocation());
}
}
示例14: CommandLineCCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
protected CommandLineCCompiler(String command, String identifierArg,
String[] sourceExtensions, String[] headerExtensions,
String outputSuffix, boolean libtool,
CommandLineCCompiler libtoolCompiler, boolean newEnvironment,
Environment env) {
super(command, identifierArg, sourceExtensions, headerExtensions,
outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
}
示例15: CommandLineFortranCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
protected CommandLineFortranCompiler(String command, String identifierArg,
String[] sourceExtensions, String[] headerExtensions,
String outputSuffix, boolean libtool,
CommandLineFortranCompiler libtoolCompiler, boolean newEnvironment,
Environment env) {
super(command, identifierArg, sourceExtensions, headerExtensions,
outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
}