本文整理汇总了Java中org.apache.tools.ant.types.Environment类的典型用法代码示例。如果您正苦于以下问题:Java Environment类的具体用法?Java Environment怎么用?Java Environment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Environment类属于org.apache.tools.ant.types包,在下文中一共展示了Environment类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:18,代码来源:CommandLineCompiler.java
示例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);
}
}
开发者ID:apache,项目名称:ant,代码行数:23,代码来源:AbstractJarSignerTask.java
示例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;
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:9,代码来源:IntelLinux32CCompiler.java
示例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;
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:9,代码来源:IntelLinux64CCompiler.java
示例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;
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:13,代码来源:GccCCompiler.java
示例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;
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:10,代码来源:GccCCompiler.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:12,代码来源:GccCompatibleCCompiler.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:11,代码来源:aCCCompiler.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:11,代码来源:VisualAgeCCompiler.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:17,代码来源:OpenWatcomFortranCompiler.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:17,代码来源:OpenWatcomCCompiler.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:20,代码来源:OpenWatcomCompiler.java
示例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());
}
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:34,代码来源:CUtil.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:9,代码来源:CommandLineCCompiler.java
示例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);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:9,代码来源:CommandLineFortranCompiler.java
示例16: PrecompilingCommandLineCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
protected PrecompilingCommandLineCompiler(String command,
String identifierArg, String[] sourceExtensions,
String[] headerExtensions, String outputSuffix, boolean libtool,
PrecompilingCommandLineCompiler libtoolCompiler,
boolean newEnvironment, Environment env) {
super(command, identifierArg, sourceExtensions, headerExtensions,
outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:9,代码来源:PrecompilingCommandLineCompiler.java
示例17: PrecompilingCommandLineCCompiler
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
protected PrecompilingCommandLineCCompiler(String command,
String identifierArg, String[] sourceExtensions,
String[] headerExtensions, String outputSuffix, boolean libtool,
PrecompilingCommandLineCCompiler libtoolCompiler,
boolean newEnvironment, Environment env) {
super(command, identifierArg, sourceExtensions, headerExtensions,
outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
}
开发者ID:cniweb,项目名称:ant-contrib,代码行数:9,代码来源:PrecompilingCommandLineCCompiler.java
示例18: addSystemProperty
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
/**
* Adds string type system property to Ant Java task.
*
* @param java Ant Java task
* @param propertyName system property name
* @param propertyValue system property value
*/
protected void addSystemProperty( Java java, String propertyName, String propertyValue )
{
Environment.Variable sysPropPlayHome = new Environment.Variable();
sysPropPlayHome.setKey( propertyName );
sysPropPlayHome.setValue( propertyValue );
java.addSysproperty( sysPropPlayHome );
}
开发者ID:sbtrun-maven-plugin,项目名称:sbtrun-maven-plugin,代码行数:15,代码来源:AbstractAntJavaBasedMojo.java
示例19: addSystemProperty
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
protected void addSystemProperty( Java java, String propertyName, String propertyValue )
{
Environment.Variable sysPropPlayHome = new Environment.Variable();
sysPropPlayHome.setKey( propertyName );
sysPropPlayHome.setValue( propertyValue );
java.addSysproperty( sysPropPlayHome );
}
开发者ID:play1-maven-plugin,项目名称:play1-maven-plugin,代码行数:8,代码来源:AbstractAntJavaBasedPlayMojo.java
示例20: addConfiguredProperty
import org.apache.tools.ant.types.Environment; //导入依赖的package包/类
public void addConfiguredProperty(Environment.Variable property) {
properties.put(property.getKey(), property.getValue());
}
开发者ID:passion1014,项目名称:metaworks_framework,代码行数:4,代码来源:ExporterTask.java
注:本文中的org.apache.tools.ant.types.Environment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论